summaryrefslogtreecommitdiff
path: root/app.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'app.tsx')
-rw-r--r--app.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.tsx b/app.tsx
index 88312e1..dcc93d8 100644
--- a/app.tsx
+++ b/app.tsx
@@ -22,8 +22,11 @@ const isLayer = (name: string) =>
["base", "mantle", "crust"].includes(name) || name.startsWith("surface") || name.startsWith("overlay");
const applyTransparency = (name: string, hex: string) => {
- if (style.transparency.get() === "off" || !isLayer(name)) return hex;
- const amount = style.transparency.get() === "high" ? 0.58 : 0.78;
+ const mode = style.transparency.get();
+ if (mode === "off" || !isLayer(name)) return hex;
+ let amount = 0.78;
+ if (mode === "low") amount = 0.88;
+ else if (mode === "high") amount = 0.58;
return `color.change(${hex}, $alpha: ${amount})`;
};