chore: refine selection color
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run

This commit is contained in:
2026-11-21 04:40:49 +07:00
parent f850f4c4c1
commit bfe2badb38
3 changed files with 100 additions and 81 deletions
+7 -1
View File
@@ -179,8 +179,14 @@ pub(crate) fn resolve(
info: derive_shades(info, colors.background, variant == ThemeVariant::Dark),
};
// Subtle is too faint over field fills; weight the accent so selection reads.
if def_color(|d| d.selection()).is_none() {
colors.selection = ramps.primary.subtle;
colors.selection = mix(
Oklch::from_hsla(ramps.primary.base),
Oklch::from_hsla(colors.background),
0.65,
)
.to_hsla();
}
let material = MaterialTokens::derive(