MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / hue

Function hue

src/common/style/CartoCSS.js:2967–2970  ·  view source on GitHub ↗
(h)

Source from the content-addressed store, hash-verified

2965 a);
2966
2967 function hue(h) {
2968 h = h < 0 ? h + 1 : (h > 1 ? h - 1 : h);
2969 if (h * 6 < 1) {return m1 + (m2 - m1) * h * 6;} else if (h * 2 < 1) {return m2;} else if (h * 3 < 2) {return m1 + (m2 - m1) * (2 / 3 - h) * 6;} else {return m1;}
2970 }
2971 },
2972 hue: function (color) {
2973 if (!('toHSL' in color)) {return null;}

Callers 1

CartoCSS.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected