Color Converter
Easy color conversion between Hex, RGB and CMYK
Instaling
// to-do
Using
Instance methods
colorconverter.from_rgb({r: 10, g: 20, b:30 }).hex()
colorconverter.from_hex('#0a141e').rgb()
colorconverter.from_hex('#8a796b').cmyk()
colorconverter.from_cmyk({c: 0, m: 12, y: 22, k: 46 }).hex()
-
Available methods
hex()
- returns a string with a hexadecimal valuerbg()
- returns an object with a RGB valuecmyk()
- returns an object with a CMYK value
Static methods
colorconverter.rgb_to_hex({r: 10, g: 20, b:30 })
colorconverter.hex_to_rgb('#0a141e')
colorconverter.hex_to_cmyk('#8a796b')
colorconverter.cmyk_to_hex({c: 0, m: 12, y: 22, k: 46 })
Manually compile
configure:
$ npm install
test:
$ grunt test
compile:
$ grunt build