Skip to content

Add themes and custom colors - #2

Merged
mlopezsegura merged 1 commit into
masterfrom
feature/themes
Nov 8, 2026
Merged

mlopezsegura merged 1 commit into
masterfrom
feature/themes

Conversation

@mlopezsegura

Copy link
Copy Markdown
Collaborator

Summary

  • Appearance dialog in the top bar: 7 themes plus Match system, and custom accent, background, panel and text colors on top of any theme.
  • The default look is unchanged. Midnight is the original palette, and every color that was hard-coded in style.css is now a CSS variable that defaults to its old value. A test checks this.
  • web/theme.js is a classic script in <head>, so the stored theme is applied before the first paint. It is stored as mlw.appearance, and invalid stored values are ignored.
  • Colors that depend on a custom color (borders, secondary text, text on the accent) are re-derived. The dialog warns when text contrast drops below 4.5:1.
  • The stream view stays black in every theme.
  • Service worker cache bumped to version 4 (theme.js added).

Testing

  • npm test: 17/17 pass, including the new tests/theme.test.mjs. It checks:
    • with nothing stored, the colors are the original ones, and the style.css defaults match Midnight;
    • every theme gives valid colors with at least 7:1 text and 4.5:1 secondary-text contrast;
    • Match system follows the OS;
    • custom colors override the theme and re-derive what depends on them;
    • invalid stored values are ignored.
  • Screenshots in headless Edge of every theme, a custom accent, Reset to default, and the dialog at 390 px width. No console errors.

🤖 Generated with Claude Code

Select Appearance in the top bar to pick a theme (Midnight, the original look and still the
default, Black, Light, Graphite, Forest, Plum, High contrast, or Match system) and to set your
own accent, background, panel and text colors. theme.js applies the choice before the first
paint; every hard-coded color in style.css is now a variable whose default is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlopezsegura
mlopezsegura merged commit 44faf4e into master Nov 8, 2026
3 checks passed
@mlopezsegura
mlopezsegura deleted the feature/themes branch November 8, 2026 19:31
github-actions Bot pushed a commit that referenced this pull request Nov 8, 2026
Select Appearance in the top bar to pick a theme (Midnight, the original look and still the
default, Black, Light, Graphite, Forest, Plum, High contrast, or Match system) and to set your
own accent, background, panel and text colors. theme.js applies the choice before the first
paint; every hard-coded color in style.css is now a variable whose default is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mlopezsegura added a commit that referenced this pull request Nov 10, 2026
Select Appearance in the top bar to pick a theme (Midnight, the original look and still the
default, Black, Light, Graphite, Forest, Plum, High contrast, or Match system) and to set your
own accent, background, panel and text colors. theme.js applies the choice before the first
paint; every hard-coded color in style.css is now a variable whose default is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mlopezsegura added a commit that referenced this pull request Nov 10, 2026
Select Appearance in the top bar to pick a theme (Midnight, the original look and still the
default, Black, Light, Graphite, Forest, Plum, High contrast, or Match system) and to set your
own accent, background, panel and text colors. theme.js applies the choice before the first
paint; every hard-coded color in style.css is now a variable whose default is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant