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

Function HSVtoHex

randomColor.js:332–347  ·  view source on GitHub ↗
(hsv)

Source from the content-addressed store, hash-verified

330 }
331
332 function HSVtoHex(hsv) {
333 var rgb = HSVtoRGB(hsv);
334
335 function componentToHex(c) {
336 var hex = c.toString(16);
337 return hex.length == 1 ? "0" + hex : hex;
338 }
339
340 var hex =
341 "#" +
342 componentToHex(rgb[0]) +
343 componentToHex(rgb[1]) +
344 componentToHex(rgb[2]);
345
346 return hex;
347 }
348
349 function defineColor(name, hueRange, lowerBounds) {
350 var sMin = lowerBounds[0][0],

Callers 1

setFormatFunction · 0.85

Calls 2

HSVtoRGBFunction · 0.85
componentToHexFunction · 0.85

Tested by

no test coverage detected