- Shipped
- November 7, 2026 at 8:40 PM UTC
- Author
- Kamo
- Commit
- 4178b3f
There was no ThemeProvider above I18nProviders, so it built on MUI's stock theme and every color="primary" button, switch, slider, tab and spinner in the app drew #1976d2. - app/lib/brandColors.ts: read the RESOLVED **************** once the org theme stylesheet (#kamo-theme-globals-css) has loaded, and again whenever it is swapped (capturing load listener + kamo-theme-config-loaded). Hex/rgb parsed; oklch/hsl/names measured on a 1px canvas. Never reads before the sheet is in, so the grey default never flashes over the brand. - I18nProviders builds primary (and secondary) from it as a palette OPTION, so MUI derives the shades from the brand. The server's brand (when it can name the tab's org) is the first paint; otherwise globals.css's neutral default, never blue. - Text on brand fills: black or white by luminance (the same 0.179 line as ON_BRAND), AA for any brand. - Brand as text: darkPrimaryTextOverlay's dark lift kept; brandTextOverlay adds its light mirror (pale brands darkened as text) for primary and secondary; contained buttons keep the exact brand. - LightSurface keeps the org brand when it swaps a dark palette for light. - The per-screen scopes **************** stay: they paint from the variable with their own AA ink, so their look is unchanged.
