colcon
v0.3.1
Published
A simple to use color code converter
Downloads
5
Maintainers
Readme
colcon
A simple to use color code converter. Supports RGB and HEX color formats.
Table of Contents
Installation
For programmatically usage install colcon locally:
npm install colcon --save
For global usage install it globally:
npm install colcon -g
Usage
To use colcon programmatically, add something like this in your code:
var colcon = require('colcon');
var hex = '#f8f8f8',
rgb = '150, 150, 150';
var newRgb = colcon.convert(hex);
var newHex = colcon.convert(rgb);
console.log('hex to rgb: ' + newRgb);
console.log('rgb to hex: ' + newHex);
For command line conversion hit:
colcon -c [color code]
API
Command line API:
Usage: colcon [options]
Options:
-h, --help output usage information
-V, --version output the version number
-c, --color [value] a color code like rgb or hex. If passing a hex color code, remove the leading #.
Programmatically API:
Release Notes
- 0.3.1
- More helpful comments
- More helpful command line output
- Some conversion improvements
- Some bugfixes
- 0.3.0
- Some bugfixes
- 0.2.0
- Global usage is now available
- Some bugfixes
- 0.1.0 Initial Release