Skip to content

feat(launchpad): optional fixed background color for the page - #60

Merged
onamfc merged 1 commit into
mainfrom
launchpad-background-color
Sep 17, 2026
Merged

onamfc merged 1 commit into
mainfrom
launchpad-background-color

Conversation

@onamfc

@onamfc onamfc commented Sep 17, 2026

Copy link
Copy Markdown
Member

The Launchpad page follows the visitor's light/dark preference and exposes only an accent. An operator who wants the page in their brand's background has no knob for it.

Change

  • LaunchpadSettings.backgroundColor and LaunchpadTheme.backgroundColor (#rrggbb, anything else dropped — same validation as accentColor). Read by readLaunchpadSettings, carried through defaultLaunchpadContent, and honored from a resolveContent hook's theme.
  • launchpadPaletteCss(backgroundColor) derives the rest of the palette: ink and muted text from whichever default set reads on that background (WCAG luminance, the same test the accent uses for button text), surfaces and borders as the background nudged 6% / 14% toward the ink. Emitted after the base styles so it overrides both the light default and the dark media query — with a background set, the page no longer changes with the visitor's theme.
  • Unset → byte-identical page to today.

Tests — reader keeps/drops it; a dark background gets light ink and a light one dark ink with the exact derived surfaces; a non-hex value is ignored; no override is emitted when unset. 385 passing.

README: field documented under the Launchpad settings block.

Stacked on #59 in spirit only — both touch launchpad.ts, no textual overlap; either merges first.

settings.launchpad.backgroundColor (#rrggbb) fixes the page background;
ink, muted text, surfaces and borders are derived from its luminance, so a
light and a dark brand both stay legible. Unset, the page keeps following
the visitor's light/dark preference. The theme a resolveContent hook returns
can carry it too.
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@onamfc
onamfc merged commit 1390635 into main Sep 17, 2026
14 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant