Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 20, 2022 09:27 pm GMT

Unhex - convert colors to RGB, HEX or HSL in bulk

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.

Github Repository

npm link

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!

Logs of running npx unhex@latest


Original Link: https://dev.to/aspnxdd/unhex-convert-colors-to-rgb-hex-or-hsl-in-bulk-9fh

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To