style: make transparency same for light/dark

This commit is contained in:
2 * r + 2 * t 2025-04-10 15:34:35 +10:00
parent e53c517829
commit d77c324fd5

View file

@ -23,8 +23,7 @@ const isLayer = (name: string) =>
const applyTransparency = (name: string, hex: string) => {
if (style.transparency.get() === "off" || !isLayer(name)) return hex;
let amount = style.transparency.get() === "high" ? 0.58 : 0.78;
if (Palette.get_default().mode === "light") amount = style.transparency.get() === "high" ? 0.53 : 0.63;
const amount = style.transparency.get() === "high" ? 0.58 : 0.78;
return `color.change(${hex}, $alpha: ${amount})`;
};