Closed kevinSuttle closed 8 years ago
Hi! Don't use string values.
var cc = require("color-convert")
var hslColors = [
[250, 100, 96],
[250, 98, 86],
[250, 96, 78],
[250, 12, 46],
[30, 100, 80],
[30, 72, 62],
[30, 6, 46],
[30, 72, 62],
[250, 14, 18],
[252, 14, 28],
[30, 100, 66]
];
for(var i=0; i < hslColors.length; i++){
console.log(hslColors[i] +" in hex is " + cc.hsl2hex(hslColors[i]));
console.log(hslColors[i] +" in ansi is " + cc.hsl2ansi(hslColors[i]));
console.log(hslColors[i] +" in ansi16 is " + cc.hsl2ansi16(hslColors[i]));
}
Ah, ok.
:dancer: Might be looking for color-string
.
Thanks.