So, my code is:
var csscolornames = ["AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond", etc];
chex = Please.make_color({base_color: csscolornames[i]});
console.log("CHEX " + chex);
chsv = Please.HEX_to_HSV(String(chex));
Everything works except when chex is using base_color:black. The console.log chex shows: #000000.randomhex where "randomhex" is a relative black color (eg. #240000). The subsequent comand HEX_to_HSV fails as the String is not in actual HEX format. Also, I need to use HEX_to_HSV as apparently if I use format:'hsv' in make_color(), the object returned doesn't have any values stored (eg. h, s, v), so I can't access them (eg. chex.h, chex.s, chex.v), if I try to console.log chex it would be [Object] [object], but when I use HEX_to_HSV, the console.log chsv would show me eg. [Object] {h:98, s:.4, v:.5}.
So, my code is:
Everything works except when chex is using
base_color:black. The console.log chex shows:#000000.randomhexwhere "randomhex" is a relative black color (eg. #240000). The subsequent comandHEX_to_HSVfails as the String is not in actual HEX format. Also, I need to useHEX_to_HSVas apparently if I useformat:'hsv'inmake_color(), the object returned doesn't have any values stored (eg. h, s, v), so I can't access them (eg. chex.h, chex.s, chex.v), if I try to console.log chex it would be[Object] [object], but when I useHEX_to_HSV, the console.log chsv would show me eg.[Object] {h:98, s:.4, v:.5}.