1414/**
1515 * Applies and persists the app's accent {@link AppTheme}.
1616 *
17- * <p>The base stylesheet's {@code -color-accent-*} tokens are purple, and
18- * (unlike a neutral-gray UI) several background/border/selection tokens in
19- * style.css are also purple-tinted hex literals rather than pure grays. So
20- * switching themes isn't just swapping the accent ramp: those extra tokens
21- * are rotated by the same hue delta as the theme's accent color, keeping
22- * their saturation/lightness identical to the default theme and making the
23- * result read as a hue change rather than a new palette.
17+ * <p>The base stylesheet's {@code -color-accent-*} tokens are purple, and a
18+ * couple of selection/syntax tokens in style.css are also purple-tinted hex
19+ * literals rather than pure grays. So switching themes isn't just swapping
20+ * the accent ramp: those extra tokens are rotated by the same hue delta as
21+ * the theme's accent color, keeping their saturation/lightness identical to
22+ * the default theme and making the result read as a hue change rather than
23+ * a new palette.
24+ *
25+ * <p>Backgrounds ({@code -color-bg-*}) are deliberately left out of that
26+ * rotation and stay pure neutral grays (defined once in style.css) for
27+ * every theme, so the accent color shows up in controls/borders/highlights
28+ * without tinting the app's panels.
2429 *
2530 * <p>The override is a small {@code .root{...}} rule containing only the
2631 * tokens above, encoded as a {@code data:text/css;base64,...} stylesheet
@@ -35,10 +40,6 @@ public class ThemeManager {
3540
3641 // Purple-tinted tokens in style.css that aren't part of the accent ramp
3742 // itself but still need to rotate with the chosen theme.
38- private static final String BG_DEFAULT = "#282a36" ;
39- private static final String BG_OVERLAY = "#22242f" ;
40- private static final String BG_SUBTLE = "#3d3f4a" ;
41- private static final String BG_INSET = "#181920" ;
4243 private static final String SELECTION_MUTED = "#68637c" ;
4344 private static final String SYNTAX_KEYWORD = "#ac80ea" ;
4445
@@ -125,10 +126,6 @@ private String buildOverrideBody(AppTheme theme) {
125126
126127 sb .append ("-color-selection-muted:" ).append (ColorUtil .rotateHex (SELECTION_MUTED , hueShift )).append (';' );
127128 sb .append ("-color-syntax-keyword:" ).append (ColorUtil .rotateHex (SYNTAX_KEYWORD , hueShift )).append (';' );
128- sb .append ("-color-bg-default:" ).append (ColorUtil .rotateHex (BG_DEFAULT , hueShift )).append (';' );
129- sb .append ("-color-bg-overlay:" ).append (ColorUtil .rotateHex (BG_OVERLAY , hueShift )).append (';' );
130- sb .append ("-color-bg-subtle:" ).append (ColorUtil .rotateHex (BG_SUBTLE , hueShift )).append (';' );
131- sb .append ("-color-bg-inset:" ).append (ColorUtil .rotateHex (BG_INSET , hueShift )).append (';' );
132129
133130 return sb .toString ();
134131 }
0 commit comments