{"id":17613778,"url":"https://github.com/chickencoding123/css-colors-to-vars","last_synced_at":"2025-10-26T19:09:58.024Z","repository":{"id":177504967,"uuid":"439092365","full_name":"chickencoding123/css-colors-to-vars","owner":"chickencoding123","description":"Remap arbitrary CSS colors to CSS variables. Useful for libraries and custom CSS files.","archived":false,"fork":false,"pushed_at":"2022-04-18T09:37:27.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T09:29:27.732Z","etag":null,"topics":["color","css","variables-css"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/chickencoding123.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":"2021-12-16T18:39:07.000Z","updated_at":"2022-05-13T10:54:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"899b7b45-e09f-408b-9306-765f25796bd4","html_url":"https://github.com/chickencoding123/css-colors-to-vars","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.4666666666666667,"last_synced_commit":"29cdfa2b2072d05ec4f8322cbf4224ff7fd4cb00"},"previous_names":["chickencoding123/css-colors-to-vars"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chickencoding123/css-colors-to-vars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chickencoding123%2Fcss-colors-to-vars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chickencoding123%2Fcss-colors-to-vars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chickencoding123%2Fcss-colors-to-vars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chickencoding123%2Fcss-colors-to-vars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chickencoding123","download_url":"https://codeload.github.com/chickencoding123/css-colors-to-vars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chickencoding123%2Fcss-colors-to-vars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005909,"owners_count":26083982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","css","variables-css"],"created_at":"2024-10-22T18:14:06.275Z","updated_at":"2025-10-11T01:05:05.134Z","avatar_url":"https://github.com/chickencoding123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"css-colors-to-vars\n======\n\n\u003cdiv align=\"center\"\u003e\n\nRemap arbitrary CSS colors to CSS variables. Useful for libraries and custom CSS files.\n\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/chickencoding123/css-colors-to-vars/blob/master/LICENSE) [![npm](https://img.shields.io/npm/v/css-colors-to-vars)](https://www.npmjs.com/package/css-colors-to-vars) \n\n\u003c/div\u003e\n\n## Features\n- Automatic name assignment for the newly created css variables\n- Pretty fast in general\n\n## How to use\n```sh\nnpm i css-colors-to-vars\n# or\nyarn add css-colors-to-vars\n```\nTo use the cli:\n```sh\nnpx remap \u003cinput CSS file path\u003e \u003coutput CSS file path\u003e\n# or\nyarn remap \u003cinput CSS file path\u003e \u003coutput CSS file path\u003e\n# e.g. npm run remap tests/fixtures/bootstrap-v5.0.2.css dist/bootstrap.css\n```\nTo use the api:\n```js\nconst remap = require('css-colors-to-vars')\n// or\nimport remap from 'css-colors-to-vars'\n// then\nconst output = remap('tests/fixtures/bootstrap-v5.0.2.css')\n\n```\nBoth cli and api will give you a remaped version with all colors saved under the `:root`\n\n## Why?\nBecause someone may find this useful. Perhaps accelarate their rewrite process when working on older CSS files. Maybe you love to use [Bootstrap](https://github.com/twbs/bootstrap), but need a greater control over the color theme because you'd want to allow your users to choose their own colors and save their preferences in their account.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchickencoding123%2Fcss-colors-to-vars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchickencoding123%2Fcss-colors-to-vars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchickencoding123%2Fcss-colors-to-vars/lists"}