Skip to content

feat(theme): a third bundled palette, Graphite, between dark and light - #62

Merged
kirillDevPro merged 1 commit into
masterfrom
feat/theme-graphite
Sep 7, 2026
Merged

feat(theme): a third bundled palette, Graphite, between dark and light#62
kirillDevPro merged 1 commit into
masterfrom
feat/theme-graphite

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

What & why

Consumers had exactly two bundled palettes, the near-black TERMINAL and LIGHT. Users asked for something in between. MoonPalette::GRAPHITE is a mid-tone graphite palette (surfaces around 5x TERMINAL's luminance, light text) that still resolves as a dark palette everywhere MoonTone and the theme-colour projection branch on is_light(), so no widget needs a third arm. Ships as themes/moon-graphite.toml plus MoonThemeConfig::moon_graphite().

Two tokens could not be borrowed from the dark set and carry their own values: text_muted (3.0:1 on the graphite shell) and red, which is also the outline danger button's ink (3.7:1). Both now clear the 4.5:1 floor the new palette tests pin. docs/PALETTE_SPEC.md documents the three bundled themes and the two rules a bundled palette must satisfy; the component API baseline gains exactly the two new items.

How to verify

tools/run-component-guardrails.ps1 (the CI job 1:1) — 451 component tests green. The new tests in moon/tokens/tests.rs and moon/theme/tests.rs pin Graphite's dark side and the contrast floors. Consumer: MoonTerminal feat/theme-graphite builds against this branch through the 3-crate override and exposes the palette as its third theme.

https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM

Consumers had exactly two bundled palettes: the near-black TERMINAL and
LIGHT. GRAPHITE sits between them, with surfaces around 5x TERMINAL's
luminance and light text, so it still resolves as a dark palette
everywhere MoonTone and the theme-colour projection branch on
is_light(). Two tokens could not be borrowed from the dark set and
carry their own values: text_muted (3.0:1 on the graphite shell) and
red, which is also the outline danger button's ink (3.7:1); both now
clear the 4.5:1 floor the palette tests pin. Ships as
themes/moon-graphite.toml plus MoonThemeConfig::moon_graphite().
@kirillDevPro
kirillDevPro merged commit 997de7e into master Sep 7, 2026
2 checks passed
@kirillDevPro
kirillDevPro deleted the feat/theme-graphite branch September 7, 2026 13:33
kirillDevPro added a commit to Moonbot-Tech/MoonTerminal that referenced this pull request Sep 7, 2026
…449)

* feat(settings): a real theme selector, and Graphite as a third theme

The General tab's two-state toggle could only flip between light and
dark. It becomes a three-entry select (Light / Graphite / Dark), and
UiThemeMode gains Graphite: a mid-tone graphite palette bundled in
MoonUI, dark-leaning so every existing dark colour set (badges, lines,
orders, chart theme) is reused through one UiThemeMode::is_light()
helper instead of a third set and a settings migration.

The login window now shares the one mode-to-theme mapping with the main
window, and a MoonBot import that carries a theme rebuilds the badge
pickers too, so the picker cannot show one variant and write the other.

Note for release notes: an older build reading a settings.toml with
ui_theme_mode = "graphite" treats the file as corrupt, renames it to
settings.toml.bak and starts from defaults.

Claude-Session: https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM

* chore(deps): re-pin MoonUI to 997de7eb for the Graphite palette

Only the MoonUI source revision moves (23 entries, e60d5e89 -> 997de7eb,
Moonbot-Tech/MoonUI#62); no third-party version changes, proven with
`cargo fetch --locked`.

Claude-Session: https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM
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