Primer branding: align dark theme with GitHub's dark color palette - #160
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
There was a problem hiding this comment.
Reviewer: ponytail (CSS/UI color change)
No blocking issues. The new dark-theme palette aligns with GitHub's actual dark-mode tokens and the primary accessibility fix (--text-muted 8b949e vs bg-card, ~5.6:1) is a solid improvement over the old iOS-style values.
One minor note for awareness (non-blocking): --text-secondary moved from #d1d1d6 (~9.2:1 contrast) to #7d8590 (~4.6:1 contrast) against --bg-card. That still clears the 4.5:1 AA threshold mentioned in the PR description, but only barely, so any future card-background tweak could push it below the minimum. Worth keeping an eye on if --bg-card ever darkens further.
Generated by Specialist PR Review for #160 · auto · 17.1 AIC · ⌖ 1.58 AIC · ⊞ 7.9K
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.
What changed
Color
#1c1c1e,#2c2c2e,#409cff,#34c759,#ff453a, etc.) with GitHub's actual dark-theme surface/text/accent colors (#0d1117,#161b22,#4493f8,#3fb950,#f85149, and related tokens) so the wizard's dark mode matches Primer's real dark palette instead of an unrelated design system's colors.rgba(27, 18, 43, 0.68)modal backdrop andrgba(20, 7, 44, 0.4)box-shadow) withrgba(var(--agent-purple-rgb), ...), so the "agent" accent stays within the same purple family already defined by the site's own--agent-purpletokens (which trace to Primer's--color-done-emphasis/--brandpurple scale) instead of an arbitrary unrelated dark-purple hex.#000000header/footer backgrounds in dark mode withvar(--bg-inset)so header/footer stay in sync with the rest of the surface palette instead of pure black.--label-orange,--yaml-key,--yaml-valueetc. updated to real GitHub dark-theme equivalents (#e3833e,#79c0ff,#a5d6ff) rather than iOS system colors.Accessibility
--text-mutedcontrast: the previous#98989d/#6e7681fell short of the repo's own 4.5:1 contrast requirement against the card background; replaced with#8b949e, a Primer/GitHub gray that meets it. (Retained--label-blue,--label-purple,--label-green,--label-pink,--label-grayat their existing light-theme-matching values since alternate dark-specific tones failed the same 4.5:1 check against white text.)Guidance that motivated these changes
Fetched via the
primer-brandMCP server (primer_brand_tokens,primer_brand_docs): Primer color tokens are structured as--base-color-scale-*primitives feeding functional--brand-color-*roles (canvas, accent, text), reinforcing that colors should trace back to a consistent token scale rather than ad-hoc hex values invented per component. Applied that principle by aligning the dark theme with GitHub's actual dark-mode color scale (already partially referenced via--color-*CSS variable fallbacks in this file) instead of the unrelated iOS-style hex values previously hardcoded for[data-color-mode="dark"].Deviations found but not fixed
--color-*custom properties with hex fallbacks — left unchanged since they already point at Primer tokens.--label-orange/color: #000000text-on-orange pairing in.recipe-key-extraswas left as-is; it's a light-mode contrast fallback for a Primer severity color and passes contrast in both light and dark since dark mode also uses black text there.linear-gradient(90deg, var(--accent-blue), var(--accent-green)), hero title gradient) were left as-is since they're already built entirely from Primer/GitHub CSS variables in one aligned hue family, per the "tasteful shine" allowance.Verification
npm test: 187/187 passing (12 test files)npm run build: succeeds