Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

fix: updating brand color figma json #702

Merged
merged 9 commits into from
May 29, 2024
Merged

fix: updating brand color figma json #702

merged 9 commits into from
May 29, 2024

Conversation

georgewrmarshall
Copy link
Collaborator

@georgewrmarshall georgewrmarshall commented May 23, 2024

Description

This PR updates the Figma JSON to remove all opacity brand color values and adds white and black colors. The reason for this change is to ensure brand consistency and improve the design system by using solid colors for white and black instead of opacity variations.

Related issues

Fixes: N/A

Manual testing steps

  1. Open the MetaMask extension.
  2. Verify that all brand colors using opacity have been replaced with solid white and black.
  3. Check various UI components to ensure the design is consistent and no visual elements are missing or incorrectly colored.

Screenshots/Recordings

Before and After screenshots are listed in the code comments for easier review

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues.
  • I've included manual testing steps.
  • I've included screenshots/recordings if applicable.
  • I’ve included tests if applicable.
  • I’ve documented my code using JSDoc format if applicable.
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g., pulled and built branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@georgewrmarshall georgewrmarshall self-assigned this May 23, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system label May 23, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [1f06eef]

Storybook: Storybook

@garrettbear
Copy link
Contributor

white and black will likely not work, but they will start working with this PR

@metamaskbot
Copy link
Collaborator

Builds ready [cca01a7]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [6b0d1df]

Storybook: Storybook

Comment on lines +558 to +572
"white": {
"white": {
"value": "#ffffff",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
}
},
"black": {
"black": {
"value": "#000000",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
}
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 24, 2024

Choose a reason for hiding this comment

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

I've updated this section so that the Figma colors will render in storybook but it's likely we should change it back an update the useJsonColor hook to handle this. @garrettbear would you be able to add the updates you made to handle these colors?

Suggested change
"white": {
"white": {
"value": "#ffffff",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
}
},
"black": {
"black": {
"value": "#000000",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
}
"white": {
"value": "#ffffff",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"black": {
"value": "#000000",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
}
Screenshot 2024-05-27 at 10 34 03 AM

Comment on lines 558 to 568
"white": {
"value": "#ffffff",
"type": "color",
"parent": "Brand Colors/v2- brand evo (preview)",
"description": ""
},
"black": {
"value": "#000000",
"type": "color",
"parent": "Brand Colors/v2- brand evo (preview)",
"description": ""
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This may break storybook unless useJsonColor hook is updated

@metamaskbot
Copy link
Collaborator

Builds ready [5dd2eaf]

Storybook: Storybook

@@ -131,7 +131,7 @@
"description": "For the stronger contrast primary semantic elements."
},
"muted": {
"value": "{blue.400-15%}",
"value": "#43aefc26",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 53 39 AM Screenshot 2024-05-27 at 10 39 48 AM

"value": "{yellow.100-15%}",
"value": "#ffdf7026",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 55 25 AM Screenshot 2024-05-27 at 10 42 10 AM

"value": "{purple.400}",
"value": "{purple.300}",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 58 25 AM Screenshot 2024-05-27 at 10 44 22 AM

Comment on lines -262 to +268
"value": "{blue.400}",
"value": "{blue.300}",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For informational read-only elements. Used for text, background, icon or border"
},
"muted": {
"value": "{blue.400-15%}",
"value": "#43aefc26",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 57 28 AM Screenshot 2024-05-27 at 10 43 32 AM

Comment on lines -230 to +242
"value": "{green.400}",
"value": "{green.300}",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For the positive semantic elements. Used for text, background, icon or border"
},
"muted": {
"value": "{green.400-15%}",
"value": "#28a74526",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For the weakest contrast positive semantic backgrounds."
},
"inverse": {
"value": "#141618",
"value": "{grey.900}",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 56 12 AM Screenshot 2024-05-27 at 10 42 51 AM

Comment on lines -302 to +308
"value": "#1098fc66",
"value": "#43aefc33",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For primary drop shadow color."
},
"error": {
"value": "#d73a4966",
"value": "#ff758466",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 59 06 AM Screenshot 2024-05-27 at 10 44 56 AM

Comment on lines -223 to -239
"500-10%": {
"value": "#1c82341a",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"025": {
"value": "#f3fcf5",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"400-15%": {
"value": "#28a74526",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 06 53 AM Screenshot 2024-05-27 at 10 33 01 AM

Comment on lines -148 to -159
},
"500-10%": {
"value": "#0376c91a",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"400-15%": {
"value": "#1098fc26",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 06 22 AM Screenshot 2024-05-27 at 10 32 50 AM

Comment on lines -308 to -319
},
"500-10%": {
"value": "#d738471a",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"400-15%": {
"value": "#e0647026",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 07 49 AM Screenshot 2024-05-27 at 10 33 19 AM

Comment on lines -388 to -405
},
"500-10%": {
"value": "#bf52081a",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"400-15%": {
"value": "#f66a0a26",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
},
"100-15%": {
"value": "#ffdf7026",
"type": "color",
"parent": "Brand Colors/v1 - current",
"description": ""
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 08 20 AM Screenshot 2024-05-27 at 10 33 34 AM

@@ -169,7 +169,7 @@
"description": "For the stronger contrast error semantic elements."
},
"muted": {
"value": "{red.400-15%}",
"value": "#e88f9726",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 54 25 AM Screenshot 2024-05-27 at 10 41 10 AM

"value": "#d7384766",
"value": "#ca354266",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 29 22 AM Screenshot 2024-05-27 at 10 49 34 AM

"value": "{blue.500-10%}",
"value": "#0376c91a",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 29 01 AM Screenshot 2024-05-27 at 10 48 59 AM

"value": "{green.500-10%}",
"value": "#1c82341a",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 28 38 AM Screenshot 2024-05-27 at 10 48 17 AM

"value": "{yellow.500-10%}",
"value": "#bf52081a",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 27, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 10 28 14 AM Screenshot 2024-05-27 at 10 47 39 AM

@metamaskbot
Copy link
Collaborator

Builds ready [b9f285a]

Storybook: Storybook

"description": ""
}
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing brand evolution JSON. Will put in a different branch

Comment on lines 16 to 40
"value": "#2d3034",
"value": "#282b2e",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"hover\" states that use background-default."
},
"default-pressed": {
"value": "#363b3f",
"value": "#36383b",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"pressed\" states that use background-alternative."
},
"alternative-hover": {
"value": "#1e2124",
"value": "#191b1d",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"hover\" states that use background-alternative."
},
"alternative-pressed": {
"value": "#272b2f",
"value": "#27292a",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"pressed\" states that use background-alternative."
},
"hover": {
"value": "#ffffff0a",
"value": "#ffffff05",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Matches what the current colors are

"background": {
"default": {
"value": "#24272A",
"description": "(grey800: #24272A) For default neutral backgrounds",
"type": "color"
},
"default-hover": {
"value": "#282B2E",
"type": "color",
"description": "(#282B2E) For component hover states that use background/default"
},
"default-pressed": {
"value": "#36383B",
"type": "color",
"description": "(#36383B) For component pressed states that use background/default"
},
"alternative": {
"value": "#141618",
"description": "(grey900: #141618) For a subtle contrast option for neutral backgrounds. (Example: backdrop, header background)",
"type": "color"
},
"alternative-hover": {
"value": "#191B1D",
"type": "color",
"description": "(#191B1D) For component hover states that use background/alternative"
},
"alternative-pressed": {
"value": "#27292A",
"type": "color",
"description": "(#27292A) For component pressed states that use background/alternative"
},
"hover": {
"value": "#FFFFFF05",
"type": "color",
"description": "(#FFFFFF05) For component hover states with no background color"
},
"pressed": {
"value": "#FFFFFF14",
"type": "color",
"description": "(#FFFFFF14) For component pressed states with no background color"
}
},

@metamaskbot
Copy link
Collaborator

Builds ready [dbfcd4a]

Storybook: Storybook

"type": "color",
"parent": "Theme Colors/Light mode",
"description": "For \"pressed\" states that use background-alternative."
},
"hover": {
"value": "#0000000a",
"value": "#00000005",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updating to original colors in prod

"default-hover": {
"value": "#FAFAFA",
"type": "color",
"description": "(#FAFAFA)For component hover states that use background/default"
},
"default-pressed": {
"value": "#EBEBEB",
"type": "color",
"description": "(#EBEBEB) For component pressed states that use background/default"
},
"alternative": {
"value": "#F2F4F6",
"description": "(grey040: #F2F4F6) For a subtle contrast option for neutral backgrounds. (Example: backdrop, header background)",
"type": "color"
},
"alternative-hover": {
"value": "#EDEFF1",
"type": "color",
"description": "(#EDEFF1) For component hover states that use background/alternative"
},
"alternative-pressed": {
"value": "#DFE0E2",
"type": "color",
"description": "(#DFE0E2) For component pressed states that use background/alternative"
},
"hover": {
"value": "#00000005",
"type": "color",
"description": "(#00000005) For component hover states with no background color"
},
"pressed": {
"value": "#00000014",

@georgewrmarshall georgewrmarshall marked this pull request as ready for review May 29, 2024 16:55
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner May 29, 2024 16:55
@metamaskbot
Copy link
Collaborator

Builds ready [07764c9]

Storybook: Storybook

@@ -71,19 +71,19 @@
},
"icon": {
"default": {
"value": "{text.default}",
"value": "{grey.000}",
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this change was a mistake @georgewrmarshall

"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For default neutral icons"
},
"alternative": {
"value": "{text.alternative}",
"value": "{grey.200}",
Copy link
Contributor

Choose a reason for hiding this comment

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

same here. i remember the designers want the icons to reference the text

Copy link
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

can you double check with hiro regarding the icon tokens situation?

@georgewrmarshall
Copy link
Collaborator Author

can you double check with hiro regarding the icon tokens situation?

I think either work for now. We can change it back to text in a future update once docs updates have been merged it contains the logic to handle those aliases #706

brianacnguyen
brianacnguyen previously approved these changes May 29, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [47ed81b]

Storybook: Storybook

Comment on lines +16 to +34
"value": "#313235",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"hover\" states that use background-default."
},
"default-pressed": {
"value": "#363b3f",
"value": "#3f4145",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"pressed\" states that use background-alternative."
},
"alternative-hover": {
"value": "#1e2124",
"value": "#1f2123",
"type": "color",
"parent": "Theme Colors/Dark mode",
"description": "For \"hover\" states that use background-alternative."
},
"alternative-pressed": {
"value": "#272b2f",
"value": "#2e3033",
Copy link
Collaborator Author

@georgewrmarshall georgewrmarshall May 29, 2024

Choose a reason for hiding this comment

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

Matches with Figma

Screenshot 2024-05-29 at 11 51 16 AM

Copy link
Contributor

@Akatori-Design Akatori-Design left a comment

Choose a reason for hiding this comment

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

Looks good!

@georgewrmarshall georgewrmarshall merged commit 23291db into main May 29, 2024
19 checks passed
@georgewrmarshall georgewrmarshall deleted the update/json branch May 29, 2024 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-design-system All issues relating to design system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants