/ncs-color

Convert NCS color names to screen/rgb values

Primary LanguageJavaScript

#ncs-color

Conversion tool for color values specified using the
Natural Color System

This module converts colors represented in NCS format to their corresponding Hex or RGB values. It works both with first edition values and second edition values (i.e. NCS 5000-N or NCS S 2060-G20Y). Note that this module does NOT check if the passed color value is actually possible to produce in actual manufacturing environments (only ~1950 colors are actually available).

###Usage CommonJS:

var hex = require('ncs-color').hex;
hex('NCS S 2080-G20Y'); // => '#65d636'

AMD:

require(['ncs-color'], function(ncs){
	ncs.rgb('NCS 5000-N'); // => 'rgb(127,127,127)'
});

Global:

<script src="ncscolor.js"></script>
<script>
    ncsColor.hex('NCS S 2060-B'); // => '#399bd6'
</script>

Available via npm:

$ npm install ncs-color --save

###License MIT © Frederik Ring