0.3.0 • Published 4 years ago
@jpruliere/nc2hex v0.3.0
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