@jpruliere/nc2hex
v0.3.0
Published
Converts a CSS named color to its hexadecimal value.
Readme
nc2hex
Converts a CSS named color from this list to its hexadecimal value.
Returns null if the color is not one of those.
Examples
const nc2hex = require('nc2hex');
console.log(nc2hex('rebeccapurple')); // #663399
console.log(nc2hex('darkgreen')); // #006400
console.log(nc2hex('lightyellow')); // #ffffe0
console.log(nc2hex('eighth')); // null