tarnagas / color-converter

Command line tool for converting colors from RGB to HEX and vice versa.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

color-converter

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.

Installation

$ git clone https://github.com/majjoha/color-converter.git
$ cd color-converter && sudo cp color-converter /usr/local/bin/color-converter

Usage

Convert a hexadecimal color to RGB

$ color-converter ff0000
#ff0000 -> rgb(255, 255, 0)
$ color-converter "#c71585"
#c71585 -> rgb(199, 21, 133)

Convert a color in RGB to a hexadecimal value

$ color-converter 255 255 0
rgb(255, 255, 0) -> #ffff00

Change luminosity of a RGB value

$ color-converter 255 255 255 -25
rgb(255, 255, 255) -> rgb(230, 230, 230)

About

Command line tool for converting colors from RGB to HEX and vice versa.

License:Other


Languages

Language:Shell 100.0%