Convert HSB/HSV color to HSL
I think this is the most precise: function hsv_to_hsl(h, s, v) { // both hsv and hsl values are in [0, 1] var l = (2 – s) * v / 2; if (l != 0) { if (l == 1) { s = 0; } else if (l < 0.5) { s = s … Read more
I think this is the most precise: function hsv_to_hsl(h, s, v) { // both hsv and hsl values are in [0, 1] var l = (2 – s) * v / 2; if (l != 0) { if (l == 1) { s = 0; } else if (l < 0.5) { s = s … Read more
From Parthik Gosar‘s link in this comment with slight modification to let you enter each value independently or all at once as an object /* accepts parameters * h Object = {h:x, s:y, v:z} * OR * h, s, v */ function HSVtoRGB(h, s, v) { var r, g, b, i, f, p, q, t; … Read more