Improve contrast of built-in themes by leveraging Oklch

This commit is contained in:
Héctor Ramón Jiménez 2025-08-05 09:21:57 +02:00
parent 148fc77b8f
commit 0857eb3bde
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
28 changed files with 124 additions and 116 deletions

View file

@ -718,13 +718,13 @@ pub fn subtle(theme: &Theme, status: Status) -> Style {
Status::Active => base,
Status::Pressed => Style {
background: Some(Background::Color(
palette.background.strongest.color,
palette.background.strong.color,
)),
..base
},
Status::Hovered => Style {
background: Some(Background::Color(
palette.background.strong.color,
palette.background.weaker.color,
)),
..base
},

View file

@ -1423,7 +1423,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
color: palette.background.strong.color,
},
icon: palette.background.weak.text,
placeholder: palette.background.strong.color,
placeholder: palette.secondary.base.color,
value: palette.background.base.text,
selection: palette.primary.weak.color,
};
@ -1447,6 +1447,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
Status::Disabled => Style {
background: Background::Color(palette.background.weak.color),
value: active.placeholder,
placeholder: palette.background.strongest.color,
..active
},
}

View file

@ -1817,10 +1817,10 @@ pub fn default(theme: &Theme, status: Status) -> Style {
border: Border {
radius: 2.0.into(),
width: 1.0,
color: palette.background.strongest.color,
color: palette.background.strong.color,
},
icon: palette.background.weak.text,
placeholder: palette.background.strongest.color,
placeholder: palette.secondary.base.color,
value: palette.background.base.text,
selection: palette.primary.weak.color,
};
@ -1844,6 +1844,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
Status::Disabled => Style {
background: Background::Color(palette.background.weak.color),
value: active.placeholder,
placeholder: palette.background.strongest.color,
..active
},
}