import ActionaleMessage from '../ui/components/ui/actionable-message';
import designTokenDiagramImage from './images/design.token.graphic.svg';
<Meta title="Design Tokens / Color" />
# Color
Color is used to express style and communicate meaning.
<ActionaleMessage
type="warning"
message="We are in the process of consolidating all of our colors, making them accessible and enabling theming. Many of the colors used throughout the codebase are deprecated please follow the guide below to ensure you are using the correct colors when building MetaMask UI"
/>
<br />
## Design tokens
We are importing design tokens as CSS variables from [@metamask/design-tokens](https://github.com/MetaMask/design-tokens) repo to help consolidate colors and enable theming across all MetaMask products.
### Token tiers
We follow a 3 tiered system for color design tokens and css variables.
These colors **SHOULD NOT** be used in your styles directly. They are used as a reference for the [theme colors](#theme-colors-tier-2). Brand colors should just keep track of every color used in our app.
#### Example of brand color css variables
```css
/** !!!DO NOT USE BRAND COLORS DIRECTLY IN YOUR CODE!!! */
var(--brand-colors-white-white000)
var(--brand-colors-white-white010)
var(--brand-colors-grey-grey030)
```
### **Theme colors** (tier 2)
Theme colors are color agnostic, semantically neutral and theme compatible design tokens that you can use in your code and styles. Please refer to the description of each token for it's intended purpose in [@metamask/design-tokens](https://github.com/MetaMask/design-tokens/blob/main/src/figma/tokens.json#L329-L554).
- Do not use static HEX values in your code. Use the [theme colors](#theme-colors-tier-2). If one does not exist for your use case ask the designer or [create an issue](https://github.com/MetaMask/metamask-extension/issues/new) and tag it with a `design-system` label.
- Make sure the design token you are using is for it's intended purpose. Please refer to the description of each token in [@metamask/design-tokens](https://github.com/MetaMask/design-tokens/blob/main/src/figma/tokens.json#L329-L554).
### ❌ Don't do this
Don't use static hex values or brand color tokens in your code.
```css
/**
* Don't do this
* Static hex values create inconsistency and will break UI when using dark mode
**/
.card {
background-color: #ffffff;
color: #24272a;
}
/**
* Don't do this
* Not theme compatible and will break UI when using dark theme