MCPcopy Create free account
hub / github.com/davidmerfield/randomColor / HSVtoHSL

Function HSVtoHSL

randomColor.js:564–575  ·  view source on GitHub ↗
(hsv)

Source from the content-addressed store, hash-verified

562 }
563
564 function HSVtoHSL(hsv) {
565 var h = hsv[0],
566 s = hsv[1] / 100,
567 v = hsv[2] / 100,
568 k = (2 - s) * v;
569
570 return [
571 h,
572 Math.round(((s * v) / (k < 1 ? k : 2 - k)) * 10000) / 100,
573 (k / 2) * 100,
574 ];
575 }
576
577 function stringToInteger(string) {
578 var total = 0;

Callers 1

setFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected