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

Function applyPreview

public/js/folderManager.js:1574–1582  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

1572 const inputEl = modal.querySelector('#folderColorInput');
1573
1574 function applyPreview(hex) {
1575 if (!hex || typeof hex !== 'string') return;
1576 const front = hex;
1577 const back = lighten(hex, 14);
1578 const stroke = darken(hex, 22);
1579 previewEl.style.setProperty('--filr-folder-front', front);
1580 previewEl.style.setProperty('--filr-folder-back', back);
1581 previewEl.style.setProperty('--filr-folder-stroke', stroke);
1582 }
1583 applyPreview(defaultHex);
1584 inputEl?.addEventListener('input', () => applyPreview(inputEl.value));
1585

Callers 1

openColorFolderModalFunction · 0.85

Calls 2

lightenFunction · 0.85
darkenFunction · 0.85

Tested by

no test coverage detected