Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographySpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardTabsFilterFormLinkLink with iconLogo wallSearch barSkip navigationSticky bannerSticky cardTileVideo thumbnail
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Customizing

Custom themesWhen to use custom themesCustom themesWhen to use custom themes

Red Hat Design System is composed of tokens, elements, and patterns, each layer building on the last. Theming emerges as a design possibility from the composition of those smaller pieces. By setting custom values for themeable design tokens, elements, sections, or entire pages can take on a new color scheme, layout density, etc. Custom themes can apply to multiple color-palettes and to both the light and dark backgrounds.

Custom themes

To create a custom theme, designers and developers need only set the values for the relevant color properties in the design system in their page's CSS. For example, let's create a custom Bordeaux theme. We'll write a CSS rule which selects for the theme-bordeaux class, and in that rule we'll set the values of RHDS theming tokens to our custom theme colors. In the following example, you can see how we first define some custom theme colours as CSS custom properties beginning with --bordeaux-, then we use those values in our custom theme by applying them to RHDS theming tokens.

In order to support user's color scheme preference as well as elements with dark color palettes, always use sure to always use the light-dark() function when crafting custom themes.

When writing themes, override the semantic, themeable tokens such as --rh-color-interactive-primary-default rather than the crayon tokens e.g. --rh-color-purple-10. This ensures that your custom colors apply to elements in the way the designers originally intended

Customizing entire pages

To customize entire page, we can apply the theme-bordeaux class to the body element.

Have you written a custom theme for RHDS? Brag about it! Let us know in slack, show it off on your blog.

When to use custom themes

A custom theme may be used for very specific brand projects like campaigns, podcasts, or events. For other applications, the default theme is already perfectly weighted. If your project does need a custom theme, contact the Brand team and Design system team for guidance.

Choosing a theme

For most projects, the light and dark themes are good enough. Evaluate your project thoroughly before creating a custom theme.

Example of a hero that uses light blue tags against a background image

Other libraries

To learn more about our other libraries, visit the getting started page.

© 2021-2025 Red Hat, Inc. Deploys by Netlify