@neos21/ccc
v1.0.7
Published
ccc : Colour Code Converter
Downloads
10
Readme
ccc : Colour Code Converter : @neos21/ccc
CLI
Installation
$ npm install -g @neos21/ccc
How To Use
# Colour Code
$ ccc 39c # -> 51,153,204
$ ccc ff8000 # -> 255,128,0
$ ccc '#007AFF' # -> 0,122,255
# RGB Code
$ ccc 0 128 255 # -> #0080ff
$ ccc 255,30,48 # -> #ff1e30
API
Installation
$ npm install --save @neos21/ccc
How To Use
const ccc = require('@neos21/ccc');
// Colour Code
ccc('39c'); // -> [ 51, 153, 204 ]
ccc('ff8000'); // -> [ 255, 128, 0 ]
ccc('#007AFF'); // -> [ 0, 122, 255 ]
// RGB Code
ccc('0, 128, 255'); // -> '#0080ff'
ccc([255, 30, 48]); // -> '#ff1e30'