mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-15 12:54:58 +00:00
* fix(app): derive theme states and plugin fills so light and Pure Black themes stay readable Hover, selected, the neutral fill and tertiary text were colors a theme picked by eye, and plugin palettes filled them by borrowing `ring` and `border`. A light plugin theme got a dark selected row under dark text, Pure Black's hover barely separated from its surface, and light terminal ANSI white was white on white. States are now fixed WCAG-contrast steps from the surface they sit on, toward the foreground, derived in styles/derive-colors.ts. Plugin themes derive their neutral fill and tertiary text instead of aliasing `ring` and `border`, and may set an optional `sidebar` color. The web focus outline follows the theme's `ring`, and light terminal white and bright white are derived to read on the background. Tokens with no consumers are removed. Existing plugin themes change look with no author action, and the composer placeholder uses foregroundMuted like every other placeholder. Co-authored-by: Nathan Green <342098+nathansgreen@users.noreply.github.com> * fix(app): accept alpha hex in plugin theme colors when deriving The plugin schema accepts #rgba and #rrggbbaa, but contrast derivation parsed only opaque hex and threw, which would crash rendering for such a theme. Derivation now reads those colors as the opaque color they sit on. * fix(app): keep derived plugin fills and tertiary text readable on low-contrast palettes A fixed contrast step for the neutral fill left text on message bubbles, secondary buttons and badges at 2.6:1 on a dark palette whose body text is 4.75:1, and the fixed fade made Solarized Light tertiary text 1.92:1. The fill step is now bounded by the text it carries and tertiary text has a floor. The plugin reference states the minimum Paseo version for sidebar and that the terminal white is derived on light themes only. * fix(app): keep the derived neutral fill visible when a theme's own text is quiet Bounding the fill by text contrast could reach a step of 1 or less on a palette whose body text is under about 3:1, returning the page background itself. The step now has a minimum. * docs(app): state the trade-off between the neutral fill step and text contrast Below about 3.8:1 body text the fill keeps its minimum step and text on it falls under 3:1. The comment now says so and a test pins both outcomes. * fix(app): leave the light terminal's ANSI white as it was ANSI white is both text and a cell background, so no single palette value is readable in both roles; making it readable as text broke black text on white cells. That needs a contrast rule in the terminal renderer, so light white and bright white return to their previous values and the derivation and its test floors are removed. * feat(plugins): make derived theme colors overridable Sidebar passive text was derived against the page even though timestamps render on hover and selected surfaces. Derive it against the resolved state surface and let contributed themes override each derived semantic role explicitly. --------- Co-authored-by: Nathan Green <342098+nathansgreen@users.noreply.github.com>