mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
template-processor: general_normal_light, clamp lightness to give better results in light mode
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user