0 points

HSVtoRGB


dashboard

Sun Jul 05 2020 06:46:52 GMT+0000 (UTC)

Posted by @ObiWanMaxim

function HSVtoRGB(t, e, i) {
            var r, n, a, s, o, h, l, p;
            switch (h = i * (1 - e), l = i * (1 - (o = 6 * t - (s = Math.floor(6 * t))) * e), p = i * (1 - (1 - o) * e), s % 6) {
                case 0:
                    r = i, n = p, a = h;
                    break;
                case 1:
                    r = l, n = i, a = h;
                    break;
                case 2:
                    r = h, n = i, a = p;
                    break;
                case 3:
                    r = h, n = l, a = i;
                    break;
                case 4:
                    r = p, n = h, a = i;
                    break;
                case 5:
                    r = i, n = h, a = l
            }
            return [r, n, a]
        }
content_copy Copy

https://lestudio-rouen.com/script/minify/index-min.js