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

Function darken

public/js/folderManager.js:1216–1218  ·  view source on GitHub ↗
(hex, amt = 22)

Source from the content-addressed store, hash-verified

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}
1219
1220function applyFolderColorToOption(folder, hex) {
1221 // accepts folder like "root" or "A/B"

Callers 2

applyFolderColorToOptionFunction · 0.85
applyPreviewFunction · 0.85

Calls 2

hexToHslFunction · 0.85
hslToHexFunction · 0.85

Tested by

no test coverage detected