From ba9926af18b508008e3d2d6ffa2075e8548d4b26 Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 24 May 2026 11:40:44 +0200 Subject: [PATCH] Increased floor and decreased ceiling of offset for brightening darker colors in dark mode/darkening brighter colors in light mode --- Config/DynamicColors.qml | 5 +++-- Modules/Settings/Content.qml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Config/DynamicColors.qml b/Config/DynamicColors.qml index 45c6902..fcb538b 100644 --- a/Config/DynamicColors.qml +++ b/Config/DynamicColors.qml @@ -30,9 +30,10 @@ Singleton { readonly property alias wallLuminance: analyser.luminance function alterColor(c: color, a: real, layer: int): color { - const luminance = getLuminance(c); + const initLuminance = getLuminance(c); + const luminance = Math.max(initLuminance, 0.001); - const offset = (!light || layer == 1 ? 1 : -layer / 2) * (light ? 0.2 : 0.3) * (1 - transparency.base) * (1 + wallLuminance * (light ? (layer == 1 ? 3 : 1) : 2.5)); + const offset = (!light || layer == 1 ? 1 : -layer / 2) * (light ? 0.2 : 0.3) * (0.2 + 0.3 * (1 - transparency.base)) * (1 + wallLuminance * (light ? (layer == 1 ? 3 : 1) : 2.5)); const scale = (luminance + offset) / luminance; const r = Math.max(0, Math.min(1, c.r * scale)); const g = Math.max(0, Math.min(1, c.g * scale)); diff --git a/Modules/Settings/Content.qml b/Modules/Settings/Content.qml index 81d33cf..8759357 100644 --- a/Modules/Settings/Content.qml +++ b/Modules/Settings/Content.qml @@ -134,7 +134,7 @@ Item { anchors.right: parent.right anchors.top: searchBar.bottom anchors.topMargin: Appearance.spacing.smaller - color: DynamicColors.tPalette.m3surfaceContainer + color: DynamicColors.tPalette.m3surfaceContainerLowest radius: Appearance.rounding.normal StackView {