Repository navigation
v1.5.0: a dark theme derived from the palette (MFB-971) - #6
Merged
Merged
Conversation
A darkTheme group: twelve colors for an interface with a dark mode, each an alias of a palette color, under a new provenance kind, derived. Surface purple-400, raised surface purple-300, text white, muted gray-400, lines gray-600, links, accent and focus orange-300, black on orange. The primary button keeps purple-200 with a white label and gets a 1px gray-400 outline (primary-edge), because purple-200 alone is 1.7:1 on purple-400. Emitted as --mfb-dark-* in brand.css, mfb-dark-* colors in Tailwind 3 and 4, darkTheme in index.js, and a section of brand-spec.md. The Figma census counts derived tokens apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a dark theme for interfaces with a dark mode, starting with the My First Bitcoin App. It applies the decisions recorded on MFB-971 (2026-10-08). This raises the version to 1.5.0, so merging releases it. Quentin or Patrick decides, and Patrick may object to the purple surface before the merge.
What changes
The new
darkThemegroup intokens.jsonholds twelve colors. Each one is an alias of a palette color, and no color is added.surfacesurface-raised(cards, sheets)texttext-mutedlinelink,accent,focuson-accentprimaryon-primaryprimary-edgeTwo contrasts in a cell are on
surface, then onsurface-raised.sourceKind,derived, defined in$verificationand in CONTRIBUTING. These tokens sit in their own group, soverify-figma.mjsnever looks for them as Figma fills. Its census counts them separately.--mfb-dark-*variables inbrand.css;mfb-dark-*colors in Tailwind 3 and 4 (bg-mfb-dark-surface,text-mfb-dark-text-muted…). The naming gate acceptsmfb-dark-<use>next to the<element>-on-<surface>roles;darkThemeinindex.js;brand-spec.md, with the reason and the contrasts for each token.The primary button: a thin outline
Purple-200 on purple-400 is 1.7:1, and 1.3:1 on purple-300. I kept the purple-200 fill and the white label, and added a 1px gray-400 outline (
primary-edge). The outline is 8.3:1 on the surface, 6.4:1 on cards and 4.9:1 against the fill, so it clears the 3:1 needed for non-text contrast everywhere.I did not choose a lighter fill: the palette has no purple lighter than purple-200, and a white fill would give the button the same color as the text.
Checks
node scripts/check.mjs: OK (8 outputs match a fresh build). I have not runverify-figma.mjs, because it needs a Figma token. This PR does not change the palette that check reads.After the release
The App's
styles.csswill replace its own dark mapping with these variables (MFB-970).🤖 Generated with Claude Code