Working on a large codebase with multiple css files, inline styles and tech lead says all colors now gotta be as HSL?
Changing 1 by 1? Forget that.
In this tutorial we will discover unhex - a nodeJS package that replaces all the colors in all the files you choose in a given directory.
Go to your project root directory and run npx unhex@latest
a CLI inquirer will appear. Select which file extensions you wish to modify, ignore any files (like node_modules) and you are ready to go!
All the files matching your configuration will be parsed and modified to whatever color representation you chose!
Top comments (0)