option to use gradient backgrounds

This commit is contained in:
j 2025-02-15 00:24:00 +01:00
commit c7ce34b0da
8 changed files with 214 additions and 1 deletions

View file

@ -190,6 +190,15 @@ async function loadEdit(id, args) {
previous = annotation
})
}
if (window.useHue && data.edit.clips && data.edit.clips.length) {
const color1 = data.edit.clips[0].hue
const color2 = data.edit.clips[parseInt(data.edit.clips.length/2)].hue
const color3 = data.edit.clips[data.edit.clips.length-1].hue
document.documentElement.style.setProperty('--color1', `hsl(${color1}, 100%, 15%, 0.8)`);
document.documentElement.style.setProperty('--color2', `hsl(${color2}, 60%, 15%, 0.8)`);
document.documentElement.style.setProperty('--color3', `hsl(${color3}, 60%, 15%, 0.8)`);
}
var value = []
pandora.layerKeys.forEach(layer => {
if (!data.layers[layer]) {