diff --git a/Scripts/python/src/theming/lib/theme.py b/Scripts/python/src/theming/lib/theme.py index adbc9d29e..871dfc8c5 100644 --- a/Scripts/python/src/theming/lib/theme.py +++ b/Scripts/python/src/theming/lib/theme.py @@ -326,14 +326,15 @@ def generate_normal_light(palette: list[Color]) -> dict[str, str]: error = find_error_color(palette) # Keep colors vibrant - darken for visibility on light bg + # Clamp lightness to [0.25, 0.45] so colors are never near-black nor washed out h, s, l = primary.to_hsl() - primary_adjusted = Color.from_hsl(h, max(s, 0.7), min(l, 0.45)) + primary_adjusted = Color.from_hsl(h, max(s, 0.7), max(min(l, 0.45), 0.25)) h, s, l = secondary.to_hsl() - secondary_adjusted = Color.from_hsl(h, max(s, 0.6), min(l, 0.40)) + secondary_adjusted = Color.from_hsl(h, max(s, 0.6), max(min(l, 0.40), 0.22)) h, s, l = tertiary.to_hsl() - tertiary_adjusted = Color.from_hsl(h, max(s, 0.5), min(l, 0.35)) + tertiary_adjusted = Color.from_hsl(h, max(s, 0.5), max(min(l, 0.35), 0.20)) # Container colors - lighter, less saturated versions of accent colors for light mode def make_container_light(base: Color) -> Color: