Fix minor styling inconsistencies in some widgets

This commit is contained in:
Héctor Ramón Jiménez 2025-08-06 02:42:51 +02:00
parent 35df95e988
commit 468014a184
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
27 changed files with 48 additions and 35 deletions

View file

@ -623,9 +623,9 @@ fn darken(color: Color, amount: f32) -> Color {
let mut oklch = to_oklch(color);
// We try to bump the chroma a bit for more colorful palettes
if oklch.c > 0.0 {
if oklch.c > 0.0 && oklch.c < (1.0 - oklch.l) / 2.0 {
// Formula empirically and cluelessly derived
oklch.c *= 1.0 + (0.3 / oklch.c).min(100.0) * amount;
oklch.c *= 1.0 + (0.2 / oklch.c).min(100.0) * amount;
}
oklch.l = if oklch.l - amount < 0.0 {