MCPcopy Create free account
hub / github.com/error311/FileRise / f

Function f

public/js/folderManager.js:1206–1210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1204function hslToHex(h, s, l) {
1205 h /= 360; s /= 100; l /= 100;
1206 const f = n => {
1207 const k = (n + h * 12) % 12, a = s * Math.min(l, 1 - l);
1208 const c = l - a * Math.max(-1, Math.min(k - 3, Math.min(9 - k, 1)));
1209 return Math.round(255 * c).toString(16).padStart(2, '0');
1210 };
1211 return '#' + f(0) + f(8) + f(4);
1212}
1213function lighten(hex, amt = 14) {

Callers 1

hslToHexFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected