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

Function lighten

public/js/folderManager.js:1213–1215  ·  view source on GitHub ↗
(hex, amt = 14)

Source from the content-addressed store, hash-verified

1211 return '#' + f(0) + f(8) + f(4);
1212}
1213function lighten(hex, amt = 14) {
1214 const { h, s, l } = hexToHsl(hex); return hslToHex(h, s, Math.min(100, l + amt));
1215}
1216function darken(hex, amt = 22) {
1217 const { h, s, l } = hexToHsl(hex); return hslToHex(h, s, Math.max(0, l - amt));
1218}

Callers 2

applyFolderColorToOptionFunction · 0.85
applyPreviewFunction · 0.85

Calls 2

hexToHslFunction · 0.85
hslToHexFunction · 0.85

Tested by

no test coverage detected