{"id":19398948,"url":"https://github.com/chaseottofy/invert-css-variables","last_synced_at":"2026-04-28T16:40:11.593Z","repository":{"id":204801534,"uuid":"712700051","full_name":"chaseottofy/invert-css-variables","owner":"chaseottofy","description":"Convert CSS variable colors in bulk.","archived":false,"fork":false,"pushed_at":"2023-11-01T07:04:49.000Z","size":95,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T13:13:48.153Z","etag":null,"topics":["color-conversion","color-inversion","color-manipulation","color-theme","color-utility","css","css-variables","design-tool","frontend-tool","invert-color","invert-colors","npm-package","styling","ui-tool"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/invert-css","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaseottofy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-01T02:18:17.000Z","updated_at":"2024-04-07T01:32:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"10c5f5c5-f4c5-45f3-a316-b558acd48c4e","html_url":"https://github.com/chaseottofy/invert-css-variables","commit_stats":null,"previous_names":["chaseottofy/invert-css-variables"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chaseottofy/invert-css-variables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseottofy%2Finvert-css-variables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseottofy%2Finvert-css-variables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseottofy%2Finvert-css-variables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseottofy%2Finvert-css-variables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaseottofy","download_url":"https://codeload.github.com/chaseottofy/invert-css-variables/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseottofy%2Finvert-css-variables/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color-conversion","color-inversion","color-manipulation","color-theme","color-utility","css","css-variables","design-tool","frontend-tool","invert-color","invert-colors","npm-package","styling","ui-tool"],"created_at":"2024-11-10T11:07:44.414Z","updated_at":"2026-04-28T16:40:11.552Z","avatar_url":"https://github.com/chaseottofy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# invert-css-variables\n\nConvert CSS variable colors in bulk.\n[USE THE UI WEB TOOL INSTEAD](https://github.com/chaseottofy/invert-css-variables-ui)\n\n[![npm Package Version](https://img.shields.io/npm/v/invert-css)](https://www.npmjs.com/package/invert-css)\n\n## Table of Contents\n\n- [Features](#features)\n- [Supported Color Formats](#supported-color-formats)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Todo](#todo)\n- [License](#license)\n\n## Features\n\nMeant to be used with CSS variables. Simplify the process of converting your Dark/Light themes by inverting your CSS variables in bulk.\n\n- Supports all of the color formats in CSS even if they are mixed.\n- Maintains the variable names and output will have proper spacing.\n- Written in TypeScript without any dependencies.\n\n### Supported Color Formats\n\n- Hex (both short `#123` and long `#112233` formats)\n- RGB (`rgb(255,255,255)`)\n- RGBA (`rgba(255,255,255,0.5)`)\n- HSL (`hsl(120,100%,50%)`)\n- HSLA (`hsla(120,100%,50%,0.5)`)\n\n## Installation\n\nTo install `invert-css` via NPM:\n \n```bash\nnpm i invert-css\n```\n\n## Usage\n\n```javascript\nimport invert from 'invert-css';\n\nconst input = `\n  --accent-1: #111;\n  --accent-2: rgb(255,170,204);\n  --accent-3: hsl(340,100%,88%);\n  --accent-4: #FFFFFF;\n`;\n\nconst result = invert(input);\n/*\nresult = `\n  --accent-1: #eee;\n  --accent-2: rgb(0,85,51);\n  --accent-3: hsl(160,100%,88%);\n  --accent-4: #000000;\n`;\n*/\n```\n\n## Testing\n\nTests are written using Jest.\nClone the repo and run the following command to run the tests:\n\n```\nnpm run test\n```\n\n## Todo\n\n- Make available in a simple web interface\n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE.md` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaseottofy%2Finvert-css-variables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaseottofy%2Finvert-css-variables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaseottofy%2Finvert-css-variables/lists"}