This command line utility simply converts colors from hexadecimal colors to RGB
and vice versa. It aims for simplicity, portability and uses bc
, cut
and other commands as little as possible.
Feel free to contribute to the project in any way or create an issue if you happen to find a bug.
$ git clone https://github.com/majjoha/color-converter.git
$ cd color-converter && sudo cp color-converter /usr/local/bin/color-converter
$ color-converter ff0000
#ff0000 -> rgb(255, 255, 0)
$ color-converter "#c71585"
#c71585 -> rgb(199, 21, 133)
$ color-converter 255 255 0
rgb(255, 255, 0) -> #ffff00
$ color-converter 255 255 255 -25
rgb(255, 255, 255) -> rgb(230, 230, 230)