Update Seek Bar Colors on Change Event, Fix: Transparent Colors Bug

This commit is contained in:
dragos-efy 2024-05-24 13:57:00 +03:00
parent 878ba3e291
commit fd44735241
2 changed files with 10 additions and 7 deletions

View file

@ -484,7 +484,7 @@ export default {
seekBarColors: {
base: "rgba(255, 255, 255, 0.3)",
buffered: "rgba(255, 255, 255, 0.54)",
played: "var(--efy_piped_color1)",
played: "var(--efy_piped_color)",
},
};

View file

@ -48,11 +48,14 @@ $ready('#efy_sidebar', ()=>{
}
// Get EFY Color Gradient in Piped
let efy_colors = efy.colors;
efy_colors.forEach((a,i)=>{
let b = a.split(' '); b.shift(); b[3] = '/ ' + b[3];
efy_colors[i] = `oklch(${b.join(' ')})`;
const efy_piped_color =()=>{ let efy_colors = [];
efy.colors.forEach((a,i)=>{
a = a.split(' ').slice(1); a[3] = `/ ${a[3]}`;
efy_colors[i] = `oklch(${a.join(' ')})`;
});
$css_prop('--efy_piped_color1', String(efy_colors));
$css_prop('--efy_piped_color', String(efy_colors));
}; efy_piped_color();
$event($('#efy_gradient'), 'change', efy_piped_color);
}, 1);