Skip to content

design-tokens: Update dark theme background.default to pure black (#000000)#1045

Draft
georgewrmarshall wants to merge 6 commits intomainfrom
cursor/background-default-pure-black-2ad1
Draft

design-tokens: Update dark theme background.default to pure black (#000000)#1045
georgewrmarshall wants to merge 6 commits intomainfrom
cursor/background-default-pure-black-2ad1

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Apr 6, 2026

Description

This updates the dark theme to align with the latest pure-black exploration and elevation mapping. Brand greys are refined and dark-mode background tokens are remapped to preserve contrast on pure black. All three token surfaces (JS, CSS, Figma JSON) are synchronized.

Brand greys updated:

  • grey700 → #292929
  • grey800 → #1f1f1f
  • grey900 → #141414
  • grey1000 → #000000

Dark-mode background tokens updated:

  • background.default → grey1000 (#000000)
  • background.section → grey900 (#141414)
  • background.subsection → grey800 (#1f1f1f)
  • background.alternative → grey1000 (#000000)
  • background.muted → #ffffff14
  • background.muted-hover → #ffffff1f
  • background.muted-pressed → #ffffff29
  • background.defaultHover → grey900 (#141414)
  • background.defaultPressed → grey800 (#1f1f1f)
  • background.hover → #ffffff14
  • background.pressed → #ffffff1f
  • border.muted → #ffffff1f

Notes:

  • These changes are dark mode only (brand greys are global by design).
  • Storybook previews should now better match the “After” mocks; secondary buttons, muted text, and surface elevations are improved.
  • No CHANGELOG entry (not a release PR).

Manual testing steps

  1. yarn build
  2. yarn test (includes CSS/JSON/JS token parity tests)
  3. Open Storybook dark mode, compare “Examples / Wallet Home” and “Examples / Backgrounds”.

Preview builds

Comment @metamaskbot publish-preview to publish @metamask-previews packages for mobile/extension testing.

Slack Thread

Open in Web Open in Cursor 

…nd sync CSS + Figma JSON; update CHANGELOG

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

📖 Storybook Preview

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Hardcoded hex breaks token reference pattern in CSS/Figma
    • Replaced the hardcoded #000000 with token references: CSS now uses var(--brand-colors-black) and Figma JSON uses {black}.

Create PR

Or push these changes by commenting:

@cursor push 55e000d072
Preview (55e000d072)
diff --git a/packages/design-tokens/src/css/dark-theme-colors.css b/packages/design-tokens/src/css/dark-theme-colors.css
--- a/packages/design-tokens/src/css/dark-theme-colors.css
+++ b/packages/design-tokens/src/css/dark-theme-colors.css
@@ -6,7 +6,7 @@
   /* Background default should be the darkest shade, 0 elevation.
   Section is +1 elevation, subsection is +2 elevation.
   Alternative should be deprecated. */
-  --color-background-default: #000000;
+  --color-background-default: var(--brand-colors-black);
   --color-background-section: var(--brand-colors-grey-grey800);
   --color-background-subsection: var(--brand-colors-grey-grey700);
   --color-background-alternative: var(--brand-colors-grey-grey1000);

diff --git a/packages/design-tokens/src/figma/darkTheme.json b/packages/design-tokens/src/figma/darkTheme.json
--- a/packages/design-tokens/src/figma/darkTheme.json
+++ b/packages/design-tokens/src/figma/darkTheme.json
@@ -1,7 +1,7 @@
 {
   "background": {
     "default": {
-      "value": "#000000",
+      "value": "{black}",
       "type": "color",
       "parent": "Theme Colors/Dark mode",
       "description": "For default neutral surface."

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit bbc33d1. Configure here.

Section is +1 elevation, subsection is +2 elevation.
Alternative should be deprecated. */
--color-background-default: var(--brand-colors-grey-grey900);
--color-background-default: #000000;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded hex breaks token reference pattern in CSS/Figma

Low Severity

The CSS --color-background-default is now hardcoded to #000000 instead of using var(--brand-colors-black), and the Figma JSON uses "#000000" instead of "{black}". Every other background token in both files references its brand color via the token system (var(--brand-colors-grey-grey800), {grey.800}, etc.), and the previous value itself was var(--brand-colors-grey-grey900). The JS file correctly uses brandColor.black. This inconsistency means a future change to --brand-colors-black would update JS tokens but leave CSS and Figma stale.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bbc33d1. Configure here.

@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

@cursor push 55e000d

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

📖 Storybook Preview

…release PR)

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

📖 Storybook Preview

…tisfy tests; JS uses brandColor.black

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

📖 Storybook Preview

@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/design-system-react": "0.13.0-preview.beee588",
  "@metamask-previews/design-system-react-native": "0.13.0-preview.beee588",
  "@metamask-previews/design-system-shared": "0.6.0-preview.beee588",
  "@metamask-previews/design-system-tailwind-preset": "0.6.1-preview.beee588",
  "@metamask-previews/design-system-twrnc-preset": "0.4.1-preview.beee588",
  "@metamask-previews/design-tokens": "8.3.0-preview.beee588"
}

…0/800/900/1000; sync JS, CSS, Figma JSON

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

📖 Storybook Preview

@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/design-system-react": "0.13.0-preview.dbe1fac",
  "@metamask-previews/design-system-react-native": "0.13.0-preview.dbe1fac",
  "@metamask-previews/design-system-shared": "0.6.0-preview.dbe1fac",
  "@metamask-previews/design-system-tailwind-preset": "0.6.1-preview.dbe1fac",
  "@metamask-previews/design-system-twrnc-preset": "0.4.1-preview.dbe1fac",
  "@metamask-previews/design-tokens": "8.3.0-preview.dbe1fac"
}

georgewrmarshall added a commit to MetaMask/metamask-mobile that referenced this pull request Apr 8, 2026
Testing MetaMask/metamask-design-system#1045 via preview package
@metamask-previews/design-tokens@8.3.0-preview.dbe1fac
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.

2 participants