update theme

This commit is contained in:
2026-10-09 11:19:56 +07:00
parent 5c15b0e840
commit 70540abd5d
11 changed files with 137 additions and 27 deletions
+13 -4
View File
@@ -53,7 +53,6 @@ pub(crate) fn dark() -> ThemeColors {
danger_muted: color::oklch(0.808, 0.114, 19.571), // red-300
danger_strong: color::oklch(0.58, 0.16, 25.0),
warning: color::oklch(0.828, 0.189, 84.429), // amber-400
warning_muted: color::oklch(0.924, 0.12, 95.746), // amber-200
success: color::oklch(0.765, 0.177, 163.223), // emerald-400
success_muted: color::oklch(0.845, 0.143, 164.978), // emerald-300
busy: color::oklch(0.718, 0.202, 349.761), // pink-400
@@ -83,6 +82,9 @@ pub(crate) fn dark() -> ThemeColors {
..ThemeColors::legacy_default()
};
// Same warning-chip rule as light: a translucent amber wash under the
// `warning` token, not an opaque plate.
colors.warning_muted = colors.warning.alpha(0.16);
colors.sync_legacy(ThemeMode::Dark);
colors
}
@@ -119,7 +121,9 @@ pub(crate) fn light() -> ThemeColors {
// ---- text ----
text: TextInk::color(ThemeMode::Light, Ink::APPKIT.light.text),
text_muted: TextInk::color(ThemeMode::Light, Ink::APPKIT.light.muted),
// One rung darker than AppKit's secondary label: sidebar and list
// labels sit on the chrome grey and need ~5:1, not the system ~4:1.
text_muted: color::neutral(0.45),
text_faint: TextInk::color(ThemeMode::Light, Ink::APPKIT.light.faint),
text_dim: color::neutral(0.50),
@@ -137,7 +141,6 @@ pub(crate) fn light() -> ThemeColors {
danger_muted: color::oklch(0.505, 0.213, 27.518), // red-700
danger_strong: color::oklch(0.51, 0.20, 25.0),
warning: color::oklch(0.555, 0.163, 48.998), // amber-700 — carries 12px text
warning_muted: color::oklch(0.473, 0.137, 46.201), // amber-800
success: color::oklch(0.596, 0.145, 163.225), // emerald-600
success_muted: color::oklch(0.508, 0.118, 165.612), // emerald-700
busy: color::oklch(0.592, 0.249, 0.584), // pink-600
@@ -147,7 +150,9 @@ pub(crate) fn light() -> ThemeColors {
// "brighten the plate, don't wash it out" rule, read the other way.
surface_raised_hover: color::neutral(0.900),
band: band_for(ThemeMode::Light),
input_bg: color::grey(0xff),
// Inputs read as one rung below the chrome grey — the old scale's
// step-3 input plate. Pure white vanished against the content plane.
input_bg: color::neutral(0.950),
selection: rgb(0xb3d7ff).into(),
cursor: color::neutral(0.205),
caret: color::neutral(0.511),
@@ -169,6 +174,10 @@ pub(crate) fn light() -> ThemeColors {
..ThemeColors::legacy_default()
};
// The warning chip is a translucent amber wash, not an opaque plate: the
// 700-800 amber reads as muddy brown, and a wash lets the label ride on
// the `warning` token in both appearances.
colors.warning_muted = colors.warning.alpha(0.10);
colors.sync_legacy(ThemeMode::Light);
colors
}