Extract colors from any text file!
colors is a CLI that parse colors from text files. It can also convert colors between different formats. Currently the application supports parsing hexadecimals (without alpha) and converting them to RGB.
⚠️ As of version0.0.2
, the output is in Truecolor mode, so if the colors does not look right, it is very likely that your terminal does not support Truecolor. In the upcoming versions, we plan to let the user customize the output format. You can check a list of devices that support Truecolor here.
npm i @mxthevs/colors -g
yarn global add @mxthevs/colors
colors /path/to/file.{txt,json,etc}
In case you already have a package or shell function named colors
in your system (This might be the case if you are using zsh, for example. You can check this by running type colors
in your terminal), you can still run this package with the command:
npx @mxthevs/colors /path/to/file.{txt,json,etc}
You can check the help page for the full set of options that colors
accept.
colors --help
Feel free to report any bug that you encounter! 😃