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

Function cutHex

app/core/utils.js:592–592  ·  view source on GitHub ↗
(h)

Source from the content-addressed store, hash-verified

590var hexToG = h => parseInt((cutHex(h)).substring(2, 4), 16)
591var hexToB = h => parseInt((cutHex(h)).substring(4, 6), 16)
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

Callers 3

hexToRFunction · 0.85
hexToGFunction · 0.85
hexToBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected