Back to top

Overview#

Design tokens are a way of naming, defining, categorizing, and sharing values in a design system. Doing so helps us produce uniform user experiences across platforms and teams. Tokens are defined once using a standard syntax, and can be transformed by software into a variety of formats and helpers, for multiple platforms.

An example token is --rh-color-brand-red-on-dark, the version of “Red Hat red” for use on dark backgrounds. It has the value #FF442B.

Tokens are for designers and developers. They aid designers by limiting the pool of available style values to the brand standards and by standardizing their names and uses. They aid developers in making it easier to implement the designers’ specification by referencing well-defined token names.

A designer might access the tokens in an XD template or via a figma plugin. We are researching the best way to make this available across teams and are eager for feedback.

A developer might use them by referencing preloaded CSS custom properties, using SCSS variables, or by using editor snippets and lint rules to auto-complete variable names in CSS files.

We want your feedback on our tokens! Are there missing values? Do you have an idea for an output format or tool integration?

Theme Tokens

Use theme tokens for best results.

Why, though?

That way, colours respond to their parents' color-palette Without requiring custom CSS

Read More

Global color#

Color helps create consistent experiences across web properties. Various colors are available in two themes, light and dark.

Ex. Token name Value Use case
Lightest surface (light theme) or primary text (dark theme) var(--rh-color-white, #ffffff) Copy Link
Brand black (avoid using) var(--rh-color-black, #000000) Copy Link

Brand#

The primary brand color is red, it brings boldness and helps guide the eye or highlight important information.

To learn more about how the red color is used, visit the Brand standards page.

--rh-color-brand-red

Red#

Ex. Token name Value Use case
Brand red on light background var(--rh-color-brand-red-on-light, #ee0000) Copy Link
Brand red on dark background var(--rh-color-brand-red-on-dark, #ee0000) Copy Link
Lightest brand red var(--rh-color-brand-red-lightest, #fbc5c5) Copy Link
lighter brand red var(--rh-color-brand-red-lighter, #f9a8a8) Copy Link
Light brand red var(--rh-color-brand-red-light, #f56e6e) Copy Link
Dark brand red/Brand red hover var(--rh-color-brand-red-dark, #a60000) Copy Link
Darker brand red var(--rh-color-brand-red-darker, #5f0000) Copy Link
Darkest brand red var(--rh-color-brand-red-darkest, #5f0000) Copy Link

Accent#

--rh-color-accent-base
--rh-color-accent-brand

Base#

Ex. Token name Value Use case
Inline link (light theme) var(--rh-color-accent-base-on-light, #0066cc) Copy Link
Inline link (dark theme) var(--rh-color-accent-base-on-dark, #92c5f9) Copy Link

Brand#

Ex. Token name Value Use case
Brand red (light theme) var(--rh-color-accent-brand-on-light, #ee0000) Copy Link
Brand red (dark theme) var(--rh-color-accent-brand-on-dark, #ee0000) Copy Link

Interactive#

Each theme features two shades of blue, one for Link and Focus states and one for Hover and Active states. Use the --rh-interactive-(blue|purple)-(normal|emphasized) theme tokens in order to style content of themable containers like <rh-surface>

<rh-surface color-palette="lighter">
<p>Use <a href="#">theme tokens</a> for best results.<p>
<rh-card color-palette="darkest">
<p>That way, colours respond to their parents' <code>color-palette</code>
Without requiring <a href="#">custom CSS</a></p>
</rh-card>
</rh-surface>
rh-surface {
& a {
color: var(--rh-color-interactive-primary-default);
&:hover { color: var(--rh-color-interactive-primary-hover); }
&:focus-within { color: var(--rh-color-interactive-primary-focus); }
&:active { color: var(--rh-color-interactive-primary-active); }
&:visited {
color: var(--rh-color-interactive-primary-visited);
&:hover { color: var(--rh-color-interactive-primary-visited-hover); }
&:focus-within { color: var(--rh-color-interactive-primary-visited-focus); }
&:active { color: var(--rh-color-interactive-primary-visited-active); }
}
}
}
--rh-color-interactive-primary-default
--rh-color-interactive-primary-hover
--rh-color-interactive-primary-active
--rh-color-interactive-primary-focus
--rh-color-interactive-primary-visited-default
--rh-color-interactive-primary-visited-hover
--rh-color-interactive-primary-visited-active
--rh-color-interactive-primary-visited-focus
--rh-color-interactive-secondary-default
--rh-color-interactive-secondary-hover
--rh-color-interactive-secondary-active
--rh-color-interactive-secondary-focus
--rh-color-interactive-secondary-visited-default
--rh-color-interactive-secondary-visited-hover
--rh-color-interactive-secondary-visited-active
--rh-color-interactive-secondary-visited-focus

Primary#

Default#
Ex. Token name Value Use case
Primary interactive - default (Light theme) var(--rh-color-interactive-primary-default-on-light, #0066cc) Copy Link
Primary interactive - default (Dark theme) var(--rh-color-interactive-primary-default-on-dark, #92c5f9) Copy Link
Hover#
Ex. Token name Value Use case
Primary interactive - hover (Light theme) var(--rh-color-interactive-primary-hover-on-light, #003366) Copy Link
Primary interactive - hover (Dark theme) var(--rh-color-interactive-primary-hover-on-dark, #b9dafc) Copy Link
Active#
Ex. Token name Value Use case
Primary interactive - active (Light theme) var(--rh-color-interactive-primary-active-on-light, #003366) Copy Link
Primary interactive - active (Dark theme) var(--rh-color-interactive-primary-active-on-dark, #b9dafc) Copy Link
Focus#
Ex. Token name Value Use case
Primary interactive - focus (Light theme) var(--rh-color-interactive-primary-focus-on-light, #003366) Copy Link
Primary interactive - focus (Dark theme) var(--rh-color-interactive-primary-focus-on-dark, #b9dafc) Copy Link
Visited#
Default#
Ex. Token name Value Use case
Primary interactive visited - default (Light theme) var(--rh-color-interactive-primary-visited-default-on-light, #5e40be) Copy Link
Primary interactive visited - default (Dark theme) var(--rh-color-interactive-primary-visited-default-on-dark, #b6a6e9) Copy Link
Hover#
Ex. Token name Value Use case
Primary interactive visited - hover (Light theme) var(--rh-color-interactive-primary-visited-hover-on-light, #21134d) Copy Link
Primary interactive visited - hover (Dark theme) var(--rh-color-interactive-primary-visited-hover-on-dark, #ece6ff) Copy Link
Active#
Ex. Token name Value Use case
Primary interactive visited - active (Light theme) var(--rh-color-interactive-primary-visited-active-on-light, #21134d) Copy Link
Primary interactive visited - active (Dark theme) var(--rh-color-interactive-primary-visited-active-on-dark, #ece6ff) Copy Link
Focus#
Ex. Token name Value Use case
Primary interactive visited - focus (Light theme) var(--rh-color-interactive-primary-visited-focus-on-light, #21134d) Copy Link
Primary interactive visited - focus (Dark theme) var(--rh-color-interactive-primary-visited-focus-on-dark, #ece6ff) Copy Link

Secondary#

Default#
Ex. Token name Value Use case
Secondary interactive - default (Light theme) var(--rh-color-interactive-secondary-default-on-light, #4d4d4d) Copy Link
Secondary interactive - default (Dark theme) var(--rh-color-interactive-secondary-default-on-dark, #c7c7c7) Copy Link
Hover#
Ex. Token name Value Use case
Secondary interactive - hover (Light theme) var(--rh-color-interactive-secondary-hover-on-light, #4d4d4d) Copy Link
Secondary interactive - hover (Dark theme) var(--rh-color-interactive-secondary-hover-on-dark, #c7c7c7) Copy Link
Active#
Ex. Token name Value Use case
Secondary interactive - active (Light theme) var(--rh-color-interactive-secondary-active-on-light, #4d4d4d) Copy Link
Secondary interactive - active (Dark theme) var(--rh-color-interactive-secondary-active-on-dark, #c7c7c7) Copy Link
Focus#
Ex. Token name Value Use case
Secondary interactive - focus (Light theme) var(--rh-color-interactive-secondary-focus-on-light, #4d4d4d) Copy Link
Secondary interactive - focus (Dark theme) var(--rh-color-interactive-secondary-focus-on-dark, #c7c7c7) Copy Link
Visited#
Default#
Ex. Token name Value Use case
Secondary interactive visited - default (Light theme) var(--rh-color-interactive-secondary-visited-default-on-light, #4d4d4d) Copy Link
Secondary interactive visited - default (Dark theme) var(--rh-color-interactive-secondary-visited-default-on-dark, #c7c7c7) Copy Link
Hover#
Ex. Token name Value Use case
Secondary interactive visited - hover (Light theme) var(--rh-color-interactive-secondary-visited-hover-on-light, #4d4d4d) Copy Link
Secondary interactive visited - hover (Dark theme) var(--rh-color-interactive-secondary-visited-hover-on-dark, #c7c7c7) Copy Link
Active#
Ex. Token name Value Use case
Secondary interactive visited - active (Light theme) var(--rh-color-interactive-secondary-visited-active-on-light, #4d4d4d) Copy Link
Secondary interactive visited - active (Dark theme) var(--rh-color-interactive-secondary-visited-active-on-dark, #c7c7c7) Copy Link
Focus#
Ex. Token name Value Use case
Secondary interactive visited - focus (Light theme) var(--rh-color-interactive-secondary-visited-focus-on-light, #4d4d4d) Copy Link
Secondary interactive visited - focus (Dark theme) var(--rh-color-interactive-secondary-visited-focus-on-dark, #c7c7c7) Copy Link

Blue#

Ex. Token name Value Use case
Inline link hover (dark theme) var(--rh-color-interactive-blue-lightest, #b9dafc) Copy Link
Inline link (dark theme) var(--rh-color-interactive-blue-lighter, #92c5f9) Copy Link
Inline link (light theme) var(--rh-color-interactive-blue-darker, #0066cc) Copy Link
Inline link hover (light theme) var(--rh-color-interactive-blue-darkest, #003366) Copy Link

Purple#

Ex. Token name Value Use case
Inline link visited hover (dark theme) var(--rh-color-interactive-purple-lightest, #ece6ff) Copy Link
Inline link visited (dark theme) var(--rh-color-interactive-purple-lighter, #b6a6e9) Copy Link
Inline link visited (light theme) var(--rh-color-interactive-purple-darker, #5e40be) Copy Link
Inline link visited hover (light theme) var(--rh-color-interactive-purple-darkest, #ece6ff) Copy Link

Canvas#

The canvas tokens should be used for page backgrounds only. To add a background to contained sections, use a surface token.

Ex. Token name Value Use case
Primary canvas (light theme) var(--rh-color-canvas-white, #ffffff) Copy Link
Primary canvas (dark theme) var(--rh-color-canvas-black, #151515) Copy Link

Surface#

--rh-color-surface
--rh-color-surface-status-danger
--rh-color-surface-status-caution
--rh-color-surface-status-warning
--rh-color-surface-status-default
--rh-color-surface-status-neutral
--rh-color-surface-status-info
--rh-color-surface-status-success
Ex. Token name Value Use case
Primary surface (light theme) var(--rh-color-surface-lightest, #ffffff) Copy Link
Tertiary surface (light theme) var(--rh-color-surface-lighter, #f2f2f2) Copy Link
Secondary surface (light theme) var(--rh-color-surface-light, #e0e0e0) Copy Link
Tertiary surface (dark theme) var(--rh-color-surface-dark, #383838) Copy Link
Alternative tertiary surface (not available for use with context provider) var(--rh-color-surface-dark-alt, #292929) Copy Link
Secondary surface (dark theme) var(--rh-color-surface-darker, #1f1f1f) Copy Link
Primary surface (dark theme) var(--rh-color-surface-darkest, #151515) Copy Link

Status#

Danger#
Ex. Token name Value Use case
Danger status surface color (light theme) var(--rh-color-surface-status-danger-on-light, #ffe3d9) Copy Link
Danger status surface color (dark theme) var(--rh-color-surface-status-danger-on-dark, #ffe3d9) Copy Link
Caution#
Ex. Token name Value Use case
Caution status surface color (light theme) var(--rh-color-surface-status-caution-on-light, #ffe8cc) Copy Link
Caution status surface color (dark theme) var(--rh-color-surface-status-caution-on-dark, #ffe8cc) Copy Link
Warning#
Ex. Token name Value Use case
Warning status surface color (light theme) var(--rh-color-surface-status-warning-on-light, #fff4cc) Copy Link
Warning status surface color (dark theme) var(--rh-color-surface-status-warning-on-dark, #73480b) Copy Link
Default#
Ex. Token name Value Use case
Default status surface color (light theme) var(--rh-color-surface-status-default-on-light, #f2f2f2) Copy Link
Default status surface color (dark theme) var(--rh-color-surface-status-default-on-dark, #f2f2f2) Copy Link
Neutral#
Ex. Token name Value Use case
Neutral status surface color (light theme) var(--rh-color-surface-status-neutral-on-light, #f2f2f2) Copy Link
Neutral status surface color (dark theme) var(--rh-color-surface-status-neutral-on-dark, #f2f2f2) Copy Link
Info#
Ex. Token name Value Use case
Info status surface color (light theme) var(--rh-color-surface-status-info-on-light, #ece6ff) Copy Link
Info status surface color (dark theme) var(--rh-color-surface-status-info-on-dark, #ece6ff) Copy Link
Success#
Ex. Token name Value Use case
Success status surface color (light theme) var(--rh-color-surface-status-success-on-light, #e9f7df) Copy Link
Success status surface color (dark theme) var(--rh-color-surface-status-success-on-dark, #e9f7df) Copy Link

Red#

Avoid using any red color token for danger or error messaging.

Ex. Token name Value Use case
var(--rh-color-red-10, #fce3e3) Copy Link
To modify opacity var(--rh-color-red-10, #fce3e3) Copy Link
To modify opacity var(--rh-color-red-10, #fce3e3) Copy Link
Lightest brand red var(--rh-color-red-20, #fbc5c5) Copy Link
To modify opacity var(--rh-color-red-20, #fbc5c5) Copy Link
To modify opacity var(--rh-color-red-20, #fbc5c5) Copy Link
Lighter brand red var(--rh-color-red-30, #f9a8a8) Copy Link
To modify opacity var(--rh-color-red-30, #f9a8a8) Copy Link
To modify opacity var(--rh-color-red-30, #f9a8a8) Copy Link
Light brand red var(--rh-color-red-40, #f56e6e) Copy Link
To modify opacity var(--rh-color-red-40, #f56e6e) Copy Link
To modify opacity var(--rh-color-red-40, #f56e6e) Copy Link
Brand red (light and dark theme) var(--rh-color-red-50, #ee0000) Copy Link
To modify opacity var(--rh-color-red-50, #ee0000) Copy Link
To modify opacity var(--rh-color-red-50, #ee0000) Copy Link
Dark brand red var(--rh-color-red-60, #a60000) Copy Link
To modify opacity var(--rh-color-red-60, #a60000) Copy Link
To modify opacity var(--rh-color-red-60, #a60000) Copy Link
Darker brand red var(--rh-color-red-70, #5f0000) Copy Link
To modify opacity var(--rh-color-red-70, #5f0000) Copy Link
To modify opacity var(--rh-color-red-70, #5f0000) Copy Link

Red orange#

The red orange color is reserved for danger or error states. Do not use it anywhere else.

Ex. Token name Value Use case
var(--rh-color-red-orange-10, #ffe3d9) Copy Link
To modify opacity var(--rh-color-red-orange-10, #ffe3d9) Copy Link
To modify opacity var(--rh-color-red-orange-10, #ffe3d9) Copy Link
var(--rh-color-red-orange-20, #fbbea8) Copy Link
To modify opacity var(--rh-color-red-orange-20, #fbbea8) Copy Link
To modify opacity var(--rh-color-red-orange-20, #fbbea8) Copy Link
var(--rh-color-red-orange-30, #f89b78) Copy Link
To modify opacity var(--rh-color-red-orange-30, #f89b78) Copy Link
To modify opacity var(--rh-color-red-orange-30, #f89b78) Copy Link
var(--rh-color-red-orange-40, #f4784a) Copy Link
To modify opacity var(--rh-color-red-orange-40, #f4784a) Copy Link
To modify opacity var(--rh-color-red-orange-40, #f4784a) Copy Link
var(--rh-color-red-orange-50, #f0561d) Copy Link
To modify opacity var(--rh-color-red-orange-50, #f0561d) Copy Link
To modify opacity var(--rh-color-red-orange-50, #f0561d) Copy Link
var(--rh-color-red-orange-60, #b1380b) Copy Link
To modify opacity var(--rh-color-red-orange-60, #b1380b) Copy Link
To modify opacity var(--rh-color-red-orange-60, #b1380b) Copy Link
var(--rh-color-red-orange-70, #731f00) Copy Link
To modify opacity var(--rh-color-red-orange-70, #731f00) Copy Link
To modify opacity var(--rh-color-red-orange-70, #731f00) Copy Link

Orange#

Ex. Token name Value Use case
Label - Filled (Orange) background color var(--rh-color-orange-10, #ffe8cc) Copy Link
To modify opacity var(--rh-color-orange-10, #ffe8cc) Copy Link
To modify opacity var(--rh-color-orange-10, #ffe8cc) Copy Link
var(--rh-color-orange-20, #fccb8f) Copy Link
To modify opacity var(--rh-color-orange-20, #fccb8f) Copy Link
To modify opacity var(--rh-color-orange-20, #fccb8f) Copy Link
Label - Filled (Orange) border color var(--rh-color-orange-30, #f8ae54) Copy Link
To modify opacity var(--rh-color-orange-30, #f8ae54) Copy Link
To modify opacity var(--rh-color-orange-30, #f8ae54) Copy Link
Label - Filled (Orange) accent color var(--rh-color-orange-40, #f5921b) Copy Link
To modify opacity var(--rh-color-orange-40, #f5921b) Copy Link
To modify opacity var(--rh-color-orange-40, #f5921b) Copy Link
Label - Filled (Orange) accent color var(--rh-color-orange-50, #ca6c0f) Copy Link
To modify opacity var(--rh-color-orange-50, #ca6c0f) Copy Link
To modify opacity var(--rh-color-orange-50, #ca6c0f) Copy Link
var(--rh-color-orange-60, #9e4a06) Copy Link
To modify opacity var(--rh-color-orange-60, #9e4a06) Copy Link
To modify opacity var(--rh-color-orange-60, #9e4a06) Copy Link
Label - Filled (Orange) text color var(--rh-color-orange-70, #732e00) Copy Link
To modify opacity var(--rh-color-orange-70, #732e00) Copy Link
To modify opacity var(--rh-color-orange-70, #732e00) Copy Link

Yellow#

Ex. Token name Value Use case
Alert - Warning background var(--rh-color-yellow-10, #fff4cc) Copy Link
To modify opacity var(--rh-color-yellow-10, #fff4cc) Copy Link
To modify opacity var(--rh-color-yellow-10, #fff4cc) Copy Link
var(--rh-color-yellow-20, #ffe072) Copy Link
To modify opacity var(--rh-color-yellow-20, #ffe072) Copy Link
To modify opacity var(--rh-color-yellow-20, #ffe072) Copy Link
var(--rh-color-yellow-30, #ffcc17) Copy Link
To modify opacity var(--rh-color-yellow-30, #ffcc17) Copy Link
To modify opacity var(--rh-color-yellow-30, #ffcc17) Copy Link
Alert - Warning accent var(--rh-color-yellow-40, #dca614) Copy Link
To modify opacity var(--rh-color-yellow-40, #dca614) Copy Link
To modify opacity var(--rh-color-yellow-40, #dca614) Copy Link
var(--rh-color-yellow-50, #b98412) Copy Link
To modify opacity var(--rh-color-yellow-50, #b98412) Copy Link
To modify opacity var(--rh-color-yellow-50, #b98412) Copy Link
var(--rh-color-yellow-60, #96640f) Copy Link
To modify opacity var(--rh-color-yellow-60, #96640f) Copy Link
To modify opacity var(--rh-color-yellow-60, #96640f) Copy Link
Alert - Warning title text var(--rh-color-yellow-70, #73480b) Copy Link
To modify opacity var(--rh-color-yellow-70, #73480b) Copy Link
To modify opacity var(--rh-color-yellow-70, #73480b) Copy Link

Green#

The green color is primarily used to indicate a success state, but it can also be used sparingly in other situations where green is needed.

Ex. Token name Value Use case
Alert - success background var(--rh-color-green-10, #e9f7df) Copy Link
To modify opacity var(--rh-color-green-10, #e9f7df) Copy Link
To modify opacity var(--rh-color-green-10, #e9f7df) Copy Link
Label - Filled (Green) border color var(--rh-color-green-20, #d1f1bb) Copy Link
To modify opacity var(--rh-color-green-20, #d1f1bb) Copy Link
To modify opacity var(--rh-color-green-20, #d1f1bb) Copy Link
var(--rh-color-green-30, #afdc8f) Copy Link
To modify opacity var(--rh-color-green-30, #afdc8f) Copy Link
To modify opacity var(--rh-color-green-30, #afdc8f) Copy Link
var(--rh-color-green-40, #87bb62) Copy Link
To modify opacity var(--rh-color-green-40, #87bb62) Copy Link
To modify opacity var(--rh-color-green-40, #87bb62) Copy Link
var(--rh-color-green-50, #63993d) Copy Link
To modify opacity var(--rh-color-green-50, #63993d) Copy Link
To modify opacity var(--rh-color-green-50, #63993d) Copy Link
Alert - Success accent var(--rh-color-green-60, #3d7317) Copy Link
To modify opacity var(--rh-color-green-60, #3d7317) Copy Link
To modify opacity var(--rh-color-green-60, #3d7317) Copy Link
Alert - Success title text var(--rh-color-green-70, #204d00) Copy Link
To modify opacity var(--rh-color-green-70, #204d00) Copy Link
To modify opacity var(--rh-color-green-70, #204d00) Copy Link

Teal#

Ex. Token name Value Use case
Alert - Default background var(--rh-color-teal-10, #daf2f2) Copy Link
To modify opacity var(--rh-color-teal-10, #daf2f2) Copy Link
To modify opacity var(--rh-color-teal-10, #daf2f2) Copy Link
var(--rh-color-teal-20, #b9e5e5) Copy Link
To modify opacity var(--rh-color-teal-20, #b9e5e5) Copy Link
To modify opacity var(--rh-color-teal-20, #b9e5e5) Copy Link
Label (Cyan) border color var(--rh-color-teal-30, #9ad8d8) Copy Link
To modify opacity var(--rh-color-teal-30, #9ad8d8) Copy Link
To modify opacity var(--rh-color-teal-30, #9ad8d8) Copy Link
var(--rh-color-teal-40, #63bdbd) Copy Link
To modify opacity var(--rh-color-teal-40, #63bdbd) Copy Link
To modify opacity var(--rh-color-teal-40, #63bdbd) Copy Link
Alert - Default accent var(--rh-color-teal-50, #37a3a3) Copy Link
To modify opacity var(--rh-color-teal-50, #37a3a3) Copy Link
To modify opacity var(--rh-color-teal-50, #37a3a3) Copy Link
var(--rh-color-teal-60, #147878) Copy Link
To modify opacity var(--rh-color-teal-60, #147878) Copy Link
To modify opacity var(--rh-color-teal-60, #147878) Copy Link
Alert - Default title text var(--rh-color-teal-70, #004d4d) Copy Link
To modify opacity var(--rh-color-teal-70, #004d4d) Copy Link
To modify opacity var(--rh-color-teal-70, #004d4d) Copy Link

Blue#

Ex. Token name Value Use case
Alert - Info background var(--rh-color-blue-10, #e0f0ff) Copy Link
To modify opacity var(--rh-color-blue-10, #e0f0ff) Copy Link
To modify opacity var(--rh-color-blue-10, #e0f0ff) Copy Link
Label - Filled (Blue) border color var(--rh-color-blue-20, #b9dafc) Copy Link
To modify opacity var(--rh-color-blue-20, #b9dafc) Copy Link
To modify opacity var(--rh-color-blue-20, #b9dafc) Copy Link
Inline link (dark theme) var(--rh-color-blue-30, #92c5f9) Copy Link
To modify opacity var(--rh-color-blue-30, #92c5f9) Copy Link
To modify opacity var(--rh-color-blue-30, #92c5f9) Copy Link
Alert - Info accent var(--rh-color-blue-40, #4394e5) Copy Link
To modify opacity var(--rh-color-blue-40, #4394e5) Copy Link
To modify opacity var(--rh-color-blue-40, #4394e5) Copy Link
Label - Filled (Blue) accent color var(--rh-color-blue-50, #0066cc) Copy Link
To modify opacity var(--rh-color-blue-50, #0066cc) Copy Link
To modify opacity var(--rh-color-blue-50, #0066cc) Copy Link
Inline link hover (light theme) var(--rh-color-blue-60, #004d99) Copy Link
To modify opacity var(--rh-color-blue-60, #004d99) Copy Link
To modify opacity var(--rh-color-blue-60, #004d99) Copy Link
Alert - Info title text var(--rh-color-blue-70, #003366) Copy Link
To modify opacity var(--rh-color-blue-70, #003366) Copy Link
To modify opacity var(--rh-color-blue-70, #003366) Copy Link

Purple#

Ex. Token name Value Use case
Label - Filled (Purple) background color var(--rh-color-purple-10, #ece6ff) Copy Link
To modify opacity var(--rh-color-purple-10, #ece6ff) Copy Link
To modify opacity var(--rh-color-purple-10, #ece6ff) Copy Link
Inline link visited hover (dark theme) var(--rh-color-purple-20, #d0c5f4) Copy Link
To modify opacity var(--rh-color-purple-20, #d0c5f4) Copy Link
To modify opacity var(--rh-color-purple-20, #d0c5f4) Copy Link
var(--rh-color-purple-30, #b6a6e9) Copy Link
To modify opacity var(--rh-color-purple-30, #b6a6e9) Copy Link
To modify opacity var(--rh-color-purple-30, #b6a6e9) Copy Link
Inline link visited (dark theme) var(--rh-color-purple-40, #876fd4) Copy Link
To modify opacity var(--rh-color-purple-40, #876fd4) Copy Link
To modify opacity var(--rh-color-purple-40, #876fd4) Copy Link
var(--rh-color-purple-50, #5e40be) Copy Link
To modify opacity var(--rh-color-purple-50, #5e40be) Copy Link
To modify opacity var(--rh-color-purple-50, #5e40be) Copy Link
Inline link visited (light theme) var(--rh-color-purple-60, #3d2785) Copy Link
To modify opacity var(--rh-color-purple-60, #3d2785) Copy Link
To modify opacity var(--rh-color-purple-60, #3d2785) Copy Link
Inline link visited hover (light theme) var(--rh-color-purple-70, #21134d) Copy Link
To modify opacity var(--rh-color-purple-70, #21134d) Copy Link
To modify opacity var(--rh-color-purple-70, #21134d) Copy Link

Gray#

In addition to white and black, each theme features various shades of gray. Be mindful of accessibility when using text or components on top of shades of gray.

Ex. Token name Value Use case
Tertiary surface (light theme) var(--rh-color-gray-10, #f2f2f2) Copy Link
To modify opacity var(--rh-color-gray-10, #f2f2f2) Copy Link
To modify opacity var(--rh-color-gray-10, #f2f2f2) Copy Link
Secondary surface (light theme) var(--rh-color-gray-20, #e0e0e0) Copy Link
To modify opacity var(--rh-color-gray-20, #e0e0e0) Copy Link
To modify opacity var(--rh-color-gray-20, #e0e0e0) Copy Link
Subtle borders (light theme) var(--rh-color-gray-30, #c7c7c7) Copy Link
To modify opacity var(--rh-color-gray-30, #c7c7c7) Copy Link
To modify opacity var(--rh-color-gray-30, #c7c7c7) Copy Link
Subtle icon (hover state) var(--rh-color-gray-40, #a3a3a3) Copy Link
To modify opacity var(--rh-color-gray-40, #a3a3a3) Copy Link
To modify opacity var(--rh-color-gray-40, #a3a3a3) Copy Link
Subtle icon var(--rh-color-gray-50, #707070) Copy Link
To modify opacity var(--rh-color-gray-50, #707070) Copy Link
To modify opacity var(--rh-color-gray-50, #707070) Copy Link
Secondary text (light theme) var(--rh-color-gray-60, #4d4d4d) Copy Link
To modify opacity var(--rh-color-gray-60, #4d4d4d) Copy Link
To modify opacity var(--rh-color-gray-60, #4d4d4d) Copy Link
Tertiary surface (dark theme) var(--rh-color-gray-70, #383838) Copy Link
To modify opacity var(--rh-color-gray-70, #383838) Copy Link
To modify opacity var(--rh-color-gray-70, #383838) Copy Link
Alternative tertiary surface (not available for use with context provider) var(--rh-color-gray-80, #292929) Copy Link
To modify opacity var(--rh-color-gray-80, #292929) Copy Link
To modify opacity var(--rh-color-gray-80, #292929) Copy Link
Secondary surface (dark theme) var(--rh-color-gray-90, #1f1f1f) Copy Link
To modify opacity var(--rh-color-gray-90, #1f1f1f) Copy Link
To modify opacity var(--rh-color-gray-90, #1f1f1f) Copy Link
Primary surface (dark theme) or primary text (light theme) var(--rh-color-gray-95, #151515) Copy Link

Status#

--rh-color-status-danger
--rh-color-status-caution
--rh-color-status-warning
--rh-color-status-neutral
--rh-color-status-note
--rh-color-status-info
--rh-color-status-success

Danger#

Ex. Token name Value Use case
Danger status color (light theme) var(--rh-color-status-danger-on-light, #b1380b) Copy Link
Danger status color (dark theme) var(--rh-color-status-danger-on-dark, #f0561d) Copy Link

Caution#

Ex. Token name Value Use case
Caution status color (light theme) var(--rh-color-status-caution-on-light, #ca6c0f) Copy Link
Caution status color (dark theme) var(--rh-color-status-caution-on-dark, #f5921b) Copy Link

Warning#

Ex. Token name Value Use case
Warning status color (light theme) var(--rh-color-status-warning-on-light, #dca614) Copy Link
Warning status color (dark theme) var(--rh-color-status-warning-on-dark, #ffcc17) Copy Link

Neutral#

Ex. Token name Value Use case
Neutral accent color (light theme) var(--rh-color-status-neutral-on-light, #4d4d4d) Copy Link
Neutral accent color (dark theme) var(--rh-color-status-neutral-on-dark, #c7c7c7) Copy Link

Note#

Ex. Token name Value Use case
Note/tip status color (light theme) var(--rh-color-status-note-on-light, #5e40be) Copy Link
Note/tip status color (dark theme) var(--rh-color-status-note-on-dark, #b6a6e9) Copy Link

Info#

Ex. Token name Value Use case
Info status color (light theme) var(--rh-color-status-info-on-light, #5e40be) Copy Link
Info status color (dark theme) var(--rh-color-status-info-on-dark, #b6a6e9) Copy Link

Success#

Ex. Token name Value Use case
Success status color (light theme) var(--rh-color-status-success-on-light, #3d7317) Copy Link
Success status color (dark theme) var(--rh-color-status-success-on-dark, #87bb62) Copy Link

Box shadow#

Ex. Token name Value Use case
Small box shadow var(--rh-box-shadow-sm, 0 2px 4px 0 rgba(21, 21, 21, 0.2)) Copy Link
Medium box shadow var(--rh-box-shadow-md, 0 4px 6px 1px rgba(21, 21, 21, 0.25)) Copy Link
Large box shadow var(--rh-box-shadow-lg, 0 6px 8px 2px rgba(21, 21, 21, 0.3)) Copy Link
Extra large box shadow var(--rh-box-shadow-xl, 0 8px 24px 3px rgba(21, 21, 21, 0.35)) Copy Link

Typography#

To learn more about how to use text, visit the typography page.

Font family#

Red Hat Fonts, designed by Jeremy Mickel and released under Open Font License, form the typographic basis for the Red Hat Design System. Pages using non-latin characters should fall back to Noto Sans. By loading language-specific Noto Sans fonts, RHDS can accomodate mixed-language content including العربية, עברית, 日本語, 조선말, മലയാളം, 汉语, 漢語, or ภาษาไทย.

Users may load those fonts from Google Fonts, for example with this HTML snippet pasted into the <head>:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@500;700&family=Noto+Sans+JP:wght@500;700&family=Noto+Sans+KR:wght@500;700&family=Noto+Sans+Malayalam:wght@500;700&family=Noto+Sans+SC:wght@500;700&family=Noto+Sans+TC:wght@500;700&family=Noto+Sans+Tamil:wght@500;700&family=Noto+Sans+Thai:wght@500;700&display=swap" rel="stylesheet">
Ex. Token name Value Use case
Aa Heading font family var(--rh-font-family-heading, RedHatDisplay, 'Red Hat Display', Helvetica, Arial, sans-serif) Copy Link
Aa Body text font family var(--rh-font-family-body-text, RedHatText, 'Red Hat Text', Helvetica, Arial, sans-serif) Copy Link
Aa Code font family var(--rh-font-family-code, RedHatMono, 'Red Hat Mono', 'Courier New', Courier, monospace) Copy Link
Aa Arabic font family var(--rh-font-family-lang-ar, 'Noto Sans Arabic') Copy Link
Aa Hebrew font family var(--rh-font-family-lang-he, 'Noto Sans Hebrew') Copy Link
Aa Japanese font family var(--rh-font-family-lang-ja, 'Noto Sans JP') Copy Link
Aa Korean font family var(--rh-font-family-lang-ko, 'Noto Sans KR') Copy Link
Aa Malayalam font family var(--rh-font-family-lang-hi, 'Noto Sans Malayalam') Copy Link
Aa Thai font family var(--rh-font-family-lang-th, 'Noto Sans Thai') Copy Link
Aa Simplified Chinese font family var(--rh-font-family-lang-zh-cn, 'Noto Sans SC') Copy Link
Aa Traditional Chinese font family var(--rh-font-family-lang-zh-hk, 'Noto Sans TC') Copy Link

Size#

Font size (text)#

Ex. Token name Value Use case
Aa 12px font size var(--rh-font-size-body-text-xs, 0.75rem) Copy Link
Aa 14px font size var(--rh-font-size-body-text-sm, 0.875rem) Copy Link
Aa 16px font size var(--rh-font-size-body-text-md, 1rem) Copy Link
Aa 18px font size var(--rh-font-size-body-text-lg, 1.125rem) Copy Link
Aa 20px font size var(--rh-font-size-body-text-xl, 1.25rem) Copy Link
Aa 24px font size var(--rh-font-size-body-text-2xl, 1.5rem) Copy Link

Font size (code)#

Ex. Token name Value Use case
Aa 12px font size var(--rh-font-size-code-xs, 0.75rem) Copy Link
Aa 14px font size var(--rh-font-size-code-sm, 0.875rem) Copy Link
Aa 16px font size var(--rh-font-size-code-md, 1rem) Copy Link
Aa 18px font size var(--rh-font-size-code-lg, 1.125rem) Copy Link
Aa 20px font size var(--rh-font-size-code-xl, 1.25rem) Copy Link
Aa 24px font size var(--rh-font-size-code-2xl, 1.5rem) Copy Link

Font size (headings)#

Ex. Token name Value Use case
Aa h6 heading font size var(--rh-font-size-heading-xs, 1.25rem) Copy Link
Aa h5 heading font size var(--rh-font-size-heading-sm, 1.5rem) Copy Link
Aa h4 heading font size var(--rh-font-size-heading-md, 1.75rem) Copy Link
Aa h3 heading font size var(--rh-font-size-heading-lg, 2.25rem) Copy Link
Aa h2 heading font size var(--rh-font-size-heading-xl, 2.5rem) Copy Link
Aa h1 heading font size var(--rh-font-size-heading-2xl, 3rem) Copy Link

Font weights#

Font weights (body)#

Ex. Token name Value Use case
Aa Regular font weight var(--rh-font-weight-body-text-regular, 400) Copy Link
Aa Medium font weight var(--rh-font-weight-body-text-medium, 500) Copy Link

Font weights (code)#

Ex. Token name Value Use case
Aa Regular font weight var(--rh-font-weight-code-regular, 400) Copy Link
Aa Medium font weight var(--rh-font-weight-code-medium, 500) Copy Link

Font weights (headings)#

Ex. Token name Value Use case
Aa Regular font weight for headings var(--rh-font-weight-heading-regular, 400) Copy Link
Aa Medium font weight for headings var(--rh-font-weight-heading-medium, 500) Copy Link
Aa Bold font weight for headings var(--rh-font-weight-heading-bold, 700) Copy Link

Line height#

Ex. Token name Value Use case
Line
height
Line height for headings var(--rh-line-height-heading, 1.3) Copy Link
Line
height
Line height for body text var(--rh-line-height-body-text, 1.5) Copy Link
Line
height
Line height for code var(--rh-line-height-code, 1.5) Copy Link

Text#

Aa
--rh-color-text-primary
Aa
--rh-color-text-secondary
Aa
--rh-color-text-brand

Border#

Width#

Ex. Token name Value Use case
1px border width; Example: Secondary CTA or Button var(--rh-border-width-sm, 1px) Copy Link
2px border width: Example: Alert var(--rh-border-width-md, 2px) Copy Link
3px border width: Example: Expanded Accordion panel var(--rh-border-width-lg, 3px) Copy Link

Radius#

Ex. Token name Value Use case
Border radius reset var(--rh-border-radius-sharp, 0.0px) Copy Link
3px border radius; Example: Card var(--rh-border-radius-default, 3px) Copy Link
Pill border radius; Example: Label var(--rh-border-radius-pill, 64px) Copy Link

Border#

--rh-color-border-strong
--rh-color-border-subtle
--rh-color-border-interactive
--rh-color-border-destructive
--rh-color-border-status-danger
--rh-color-border-status-caution
--rh-color-border-status-warning
--rh-color-border-status-neutral
--rh-color-border-status-info
--rh-color-border-status-success

Width#

Ex. Token name Value Use case
1px border width; Example: Secondary CTA or Button var(--rh-border-width-sm, 1px) Copy Link
2px border width: Example: Alert var(--rh-border-width-md, 2px) Copy Link
3px border width: Example: Expanded Accordion panel var(--rh-border-width-lg, 3px) Copy Link

Radius#

Ex. Token name Value Use case
Border radius reset var(--rh-border-radius-sharp, 0.0px) Copy Link
3px border radius; Example: Card var(--rh-border-radius-default, 3px) Copy Link
Pill border radius; Example: Label var(--rh-border-radius-pill, 64px) Copy Link

Opacity#

Ex. Token name Value Use case
0% opacity var(--rh-opacity-0, 0%) Copy Link
10% opacity var(--rh-opacity-10, 10%) Copy Link
20% opacity var(--rh-opacity-20, 20%) Copy Link
30% opacity var(--rh-opacity-30, 30%) Copy Link
40% opacity var(--rh-opacity-40, 40%) Copy Link
50% opacity var(--rh-opacity-50, 50%) Copy Link
60% opacity var(--rh-opacity-60, 60%) Copy Link
70% opacity var(--rh-opacity-70, 70%) Copy Link
80% opacity var(--rh-opacity-80, 80%) Copy Link
90% opacity var(--rh-opacity-90, 90%) Copy Link
100% opacity var(--rh-opacity-100, 100%) Copy Link

Space#

Spacers are visual cues used to define fixed amounts of space between elements. They make it easy for designers to maintain consistent spacing across components and patterns as well as simplify the handoff process between designers and developers. Consistent spacing helps maintain balance and rhythm across the system.

Ex. Token name Value Use case
4px spacer var(--rh-space-xs, 4px) Copy Link
6px spacer var(--rh-space-sm, 6px) Copy Link
8px spacer var(--rh-space-md, 8px) Copy Link
16px spacer var(--rh-space-lg, 16px) Copy Link
24px spacer var(--rh-space-xl, 24px) Copy Link
32px spacer var(--rh-space-2xl, 32px) Copy Link
48px spacer var(--rh-space-3xl, 48px) Copy Link
64px spacer var(--rh-space-4xl, 64px) Copy Link
80px spacer var(--rh-space-5xl, 80px) Copy Link
96px spacer var(--rh-space-6xl, 96px) Copy Link
128px spacer var(--rh-space-7xl, 128px) Copy Link

Length#

Ex. Token name Value Use case
1px length token var(--rh-length-4xs, 1px) Copy Link
2px length token var(--rh-length-3xs, 2px) Copy Link
3px length token var(--rh-length-2xs, 3px) Copy Link
4px length token var(--rh-length-xs, 4px) Copy Link
6px length token var(--rh-length-sm, 6px) Copy Link
8px length token var(--rh-length-md, 8px) Copy Link
16px length token var(--rh-length-lg, 16px) Copy Link
24px length token var(--rh-length-xl, 24px) Copy Link
32px length token var(--rh-length-2xl, 32px) Copy Link
48px length token var(--rh-length-3xl, 48px) Copy Link
64px length token var(--rh-length-4xl, 64px) Copy Link
80px length token var(--rh-length-5xl, 80px) Copy Link
96px length token var(--rh-length-6xl, 96px) Copy Link
128px length token var(--rh-length-7xl, 128px) Copy Link

Icon#

Icon#

--rh-color-icon-primary
--rh-color-icon-secondary
--rh-color-icon-status-danger
--rh-color-icon-status-caution
--rh-color-icon-status-warning
--rh-color-icon-status-default
--rh-color-icon-status-neutral
--rh-color-icon-status-info
--rh-color-icon-status-success

Breakpoints#

When layouts change in size responding to screen size, visual elements may adjust their size, hide, or otherwise adapt to compensate for gains or losses in screen real estate.

Red Hat's breakpoint tokens represent the minimum CSS pixel width of a device's screen, corresponding to the min-width media query so for example a device with a screen width less than the --rh-breakpoint-xs token is considered a mobile device in portrait mode, whereas a device with a screen width greater than the --rh-breakpoint-xl token is considered a desktop with a large screen.

Since CSS currently does not allow custom properties in media queries, these tokens must be uses in preprocessors or templating systems, or imported into JavaScript modules. We recommend against importing these token values directly into components. In Red Hat's Design System, we import them into a reactive controller which exposes information about the screen size through a JavaScript API.

See also media queries.

static styles = css`
@media (max-width:
${Breakpointxs}) {
/* ... mobile portrait styles */
}
`
;
Ex. Token name Value Use case
Mobile portrait (max-width) var(--rh-breakpoint-2xs-max, 575px) Copy Link
Mobile portrait var(--rh-breakpoint-xs, 576px) Copy Link
Mobile landscape (max-width) var(--rh-breakpoint-xs-max, 767px) Copy Link
Mobile landscape var(--rh-breakpoint-sm, 768px) Copy Link
Mobile landscape (max-width) var(--rh-breakpoint-sm-max, 991px) Copy Link
Tablet portrait var(--rh-breakpoint-md, 992px) Copy Link
Tablet portrait (max-width) var(--rh-breakpoint-md-max, 1199px) Copy Link
Tablet landscape var(--rh-breakpoint-lg, 1200px) Copy Link
Tablet landscape (max-width) var(--rh-breakpoint-lg-max, 1439px) Copy Link
Desktop small var(--rh-breakpoint-xl, 1440px) Copy Link
Desktop small (max-width) var(--rh-breakpoint-xl-max, 1679px) Copy Link
Desktop large var(--rh-breakpoint-2xl, 1680px) Copy Link

Media Queries#

For use in templating systems and JavaScript modules. We recommend against importing tokens directly into components. These are directly derived from breakpoints.

<link rel="stylesheet"
href="large-screen.css"
media="{{ tokens.get('--rh-media-lg') }}"
Ex. Token name Value Use case
Mobile portrait var(--rh-media-xs, (min-width: 576px)) Copy Link
Mobile landscape var(--rh-media-sm, (min-width: 768px)) Copy Link
Tablet portrait var(--rh-media-md, (min-width: 992px)) Copy Link
Tablet landscape var(--rh-media-lg, (min-width: 1200px)) Copy Link
Desktop small var(--rh-media-xl, (min-width: 1440px)) Copy Link
Desktop Large var(--rh-media-2xl, (min-width: 1680px)) Copy Link