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

Function toHex

app/core/utils.js:596–600  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

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)
598 if (h.length === 1) { h = '0' + h }
599 return h
600}
601
602const pathToUrl = function (path) {
603 const base = location.protocol + '//' + location.hostname + (location.port && (':' + location.port))

Callers 1

hslToHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected