MCPcopy Create free account
hub / github.com/codecombat/codecombat / hslToHex

Function hslToHex

app/core/utils.js:594–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592var cutHex = function (h) { if (h.charAt(0) === '#') { return h.substring(1, 7) } else { return h } }
593
594const hslToHex = hsl => '#' + (Array.from(hslToRgb(...Array.from(hsl || []))).map((n) => toHex(n))).join('')
595
596var toHex = function (n) {
597 let h = Math.floor(n).toString(16)

Callers 2

addColorTintGroupMethod · 0.85
utils.jsFile · 0.85

Calls 1

toHexFunction · 0.85

Tested by

no test coverage detected