{"id":25213936,"url":"https://github.com/einenlum/tailwind-alchemist","last_synced_at":"2025-10-25T13:31:45.687Z","repository":{"id":274842488,"uuid":"924127662","full_name":"Einenlum/tailwind-alchemist","owner":"Einenlum","description":"A CLI tool to find and replace Tailwind CSS colors 🪄","archived":false,"fork":false,"pushed_at":"2025-01-30T13:25:05.000Z","size":1366,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T11:49:39.768Z","etag":null,"topics":["colors","css","tailwind","tailwindcss"],"latest_commit_sha":null,"homepage":"","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/Einenlum.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":"2025-01-29T13:18:35.000Z","updated_at":"2025-02-01T09:47:31.000Z","dependencies_parsed_at":"2025-01-29T18:34:09.335Z","dependency_job_id":null,"html_url":"https://github.com/Einenlum/tailwind-alchemist","commit_stats":null,"previous_names":["einenlum/tailwind-alchemist"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einenlum%2Ftailwind-alchemist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einenlum%2Ftailwind-alchemist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einenlum%2Ftailwind-alchemist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einenlum%2Ftailwind-alchemist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Einenlum","download_url":"https://codeload.github.com/Einenlum/tailwind-alchemist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238152330,"owners_count":19425076,"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","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":["colors","css","tailwind","tailwindcss"],"created_at":"2025-02-10T16:58:00.286Z","updated_at":"2025-10-25T13:31:45.346Z","avatar_url":"https://github.com/Einenlum.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/einenlum/tailwind-alchemist\"\u003e\n\u003cimg src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n\u003c/a\u003e\n\u003ch3 align=\"center\"\u003eTailwind Alchemist 🪄\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/einenlum/tailwind-alchemist/actions/workflows/node.js.yml/badge.svg\" alt=\"CI Badge\" width=\"120\"\u003e\n    \u003cbr/\u003e\n    \u003cbr /\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\nA CLI tool to manage and replace Tailwind CSS colors in your project.\u003cbr /\u003eBuilt for developers who want to keep their Tailwind color usage clean and consistent.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003c/p\u003e\n\u003cimg src=\"images/demo.gif\" alt=\"Logo\" width=\"480\"\u003e\n\u003cbr/\u003e\n\u003c/div\u003e\n\n**A common use case:**\n\n- You find a great starter kit for your project, but then you realize that **all the Tailwind colors are hardcoded** into the templates.\n- You want to **extract them into a custom CSS file** so you can easily change them in the future and maintain consistency. However, doing so can be time-consuming.\n\n**Tailwind Alchemist** has you covered! ✨\n\n---\n\n## Installation\n\nNo need to install it, you can run it with `npx`.\n\n## Usage\n\nAll commands require at least one option `-p` or `--pattern` to know where to look for.\n\n- Example with one pattern: `-p 'resources/views/**'`\n- Example with multiple patterns: `-p 'resources/views/**' -p 'my/other/folder/**'`\n\n### Scan for Tailwind Default Colors\n\nTo scan your project for Tailwind default colors:\n\n```bash\nnpx tw-alchemist scan -p 'resources/views/**' -p 'some/other/folder/**'\n```\n\nOptions:\n\n- `-v`: Display the files where the colors are found.\n\n```bash\nnpx tw-alchemist scan -p 'resources/views/**' -v\n```\n\n- `-vv`: Display the files and matches where the colors are found.\n\n```bash\nnpx tw-alchemist scan -p 'resources/views/**' -vv\n```\n\n### Scan for a specific color (even a custom one)\n\n```bash\nnpx tw-alchemist scan indigo-800 -p 'resources/views/**' -vv\n```\n\n### Replace Colors\n\nTo replace an existing color with another one:\n\n```bash\nnpx tw-alchemist replace oldColor newColor -p 'resources/views/**'\n```\n\nTo check what would be done without touching files, use `--dry-run`:\n\n```bash\nnpx tw-alchemist replace oldColor newColor -p 'resources/views/**' --dry-run\n```\n\nNotes:\n\n- If `newColor` doesn’t exist in your Tailwind config, the tool will print the necessary CSS for you to add.\n- If `oldColor` is one of Tailwind’s default colors, the tool will use its **OKLCH value** for accurate replacement.\n\n\n## Compatibility\n\nOnly compatible with TailwindCSS 4.x.\n\nShould work more or less on TailwindCSS 3.x.\n\nTested with Node 18.x, 20.x, and 22.x.\n\n## Disclaimer\n\nThis tool is **not** affiliated with Tailwind CSS or its creators. It’s a personal project built to help developers manage their Tailwind CSS colors.\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or submit a pull request.\n\n## Tests\n\nAfter installing the project locally (`npm install`), you can run the tests with:\n\n```bash\nnpm run test\n```\n\n## Author\n\nYann Rabiller ([@einenlum](https://github.com/Einenlum/)). You can check my [blog](https://www.einenlum.com) and my [book](https://fromphptopython.com) _From PHP to Python_.\n\n## License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](/license) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinenlum%2Ftailwind-alchemist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinenlum%2Ftailwind-alchemist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinenlum%2Ftailwind-alchemist/lists"}