If you answer yes, we store and analyse information that helps us improve the website. You can change your choice at any time at the bottom of the page. More about what we store and why.

We also store necessary information that cannot be opted out of. This makes the website work and keeps it secure.

Skip to main content

What are you looking for?

Try searching for…

Getting started

Colors

How the semantic colors are structured, and how you use them in light and dark mode.

Updated November 15, 2026

Naming structure

The colors in Designsystemet are semantic. You don't choose a color based on how it looks, but based on what it will be used for. This makes it easier to use colors consistently across components, themes, and color modes.

The color names in Designsystemet are divided into 3 parts: Name of the color scale, group (area of use), and variant. These parts describe how the colors are built up and how they should be used.

Shows the structure of a semantic color
Shows the structure of a semantic color
Click the image or press Escape to close
  • Name The first part and the name of the color scale. By default, Designsystemet comes with the color scales Success, Danger, Warning, Info, and Neutral. More scales can be added using the Theme Builder.

  • Group Each color scale is divided into the groups Background, Surface, Border, Text, and Base. These groups describe the areas of use for the colors. For example, the Text group should be used for text and icons.

Background
default
tinted
Surface
default
tinted
hover
active
Border
subtle
default
strong
Text
subtle
default
Base
default
hover
active
contrast-subtle
contrast-default
Shows a color scale and the groups that the colors are divided into. The colors are generated with the same code the Theme Builder uses.
  • Variant Within each group, there are variants that describe how the colors look or should be used. For example, Tinted means the color has a hint of color in it, while Hover means the color is intended to be used for an interactive state.

Contrast

By default, the semantic colors are designed to meet contrast requirements, regardless of which base color you have chosen. This applies in particular to text colors against background and surface colors.

The "Minimum contrast" column in the table of colors shows the minimum contrast each color has, and against which other colors in the same color scale.

You have to check the contrast of base-default yourself

base-default is an exception. In light mode, it is always the same as the color you selected, to preserve your brand as accurately as possible. We therefore can't guarantee that it has sufficient contrast against the background it is placed on.

base-default is used semantically to show state, for example as the fill color of an active switch or a checked checkbox. The color then needs a contrast of at least 3:1 against the background or surface color it is placed on, as required by 1.4.11 Non-text Contrast (w3.org).

The Theme Builder checks this for you. Under "Contrasts between colours" you can see the contrast between base-default and the background and surface colors. If you already have a theme, you can import your config file in the Theme Builder and have the contrasts checked there.

Light and dark mode

This section describes how the colors are generated by default. You can override individual colors for light and dark mode, and you then have to make sure yourself that they work and have sufficient contrast.

The steps in a color scale have the same names and the same roles in both light and dark mode. Only the color values behind the tokens change. This makes it possible to switch between light and dark mode without having to change colors in the design, and it makes it easier to build components that work in both modes.

The colors are also designed to follow the same contrast principles in both modes. The goal is that you can use Background, Surface, Border and Text in the same way, whether the interface is light or dark. Base is the most important exception, and is therefore covered separately.

In dark mode, the colors are also slightly reduced in saturation so that they work better on dark surfaces.

Background and Surface in light and dark mode

In light mode, both background-default and surface-default are white, regardless of which color scale you use. This makes it possible to have white surfaces, such as cards and panels, on top of a white background.

In dark mode, neither the background nor the surfaces are completely black. Instead, the Background and Surface colors get their hue from the scale generated from the selected Base color. The Surface colors are lighter than Background, so that they can build up depth and hierarchy above the background. This is especially important in dark mode, because differences between background and surfaces are used to a greater extent to create depth and clear hierarchy.

A color scale therefore has several Background and Surface colors. They cover different needs in light mode, while also providing clear and even transitions in dark mode.

The Base colors behave slightly differently

base-default is based on the color selected in the Theme Builder. In light mode, this color is used directly, while in dark mode it is adjusted automatically to work better on dark surfaces.

See also the pages on Colors in code and Modes in Figma for how to switch between light and dark mode in practice.

All colors in a color scale

Each color scale consists of a total of 16 colors, designed to cover different needs in the design. The table shows what each color is used for, and the minimum contrast it has against other colors in the same color scale.

NameUsageMinimum contrast
background-defaultDefault background color.–
background-tintedBackground with a hint of color.–
surface-defaultDefault color for surfaces / components.–
surface-tintedSurfaces / components with a hint of color.–
surface-hoverHover color for surfaces / components.–
surface-activeActive color for surfaces / components.–
border-subtleBorder color with low contrast for decorative use (dividers).–
border-defaultDefault border color for form components and meaningful elements.

3:1 against all background colors, surface-default, and surface-tinted

border-strongBorder color with high contrast for extra visibility.

3:1 against all background colors and all surface colors

text-subtleText and icon color with lower contrast.

4.5:1 against all background colors, surface-default, and surface-tinted

text-defaultText and icon color with high contrast and good visibility.

4.5:1 against all background colors and all surface colors

base-defaultDefault color for solid backgrounds.–
base-hoverHover color for solid backgrounds.–
base-activeActive color for solid backgrounds.–
base-contrast-subtleColor with good contrast against Base-default.

4.5:1 against base-default

base-contrast-defaultColor with good contrast against Base-default and Base-hover.

4.5:1 against base-default and base-hover

How to use the colors

The colors are divided into the groups Background, Surface, Border, Text and Base. Below you'll find more about each group and when to use the different colors.

Shows how the semantic colors are divided into variants
Shows how the semantic colors are divided into variants
Click the image or press Escape to close
Shows how the semantic colors can be used in the design. The example uses four different color scales: Danger, Neutral, and two blue scales.

Background

Background colors are used to color large surfaces and are often the back layer on a website. It's common to use these colors on the body element.

  • background-default is the lightest and most neutral background color.
  • background-tinted gets a hint of color in it and can be used to create variation in the background layer.

Surface

Surface colors are used to color elements that sit above the background colors, such as panels or cards. These colors serve as foreground colors and help create depth in the design by separating elements from the background. In dark mode, these four colors become gradually lighter, with surface-active being the lightest.

  • surface-default is completely white in light mode and is used as the standard background color for elements.
  • surface-tinted gets a hint of color in it and can be used to distinguish elements from the background.
  • surface-hover can be used for hover states for elements or to create visual hierarchies in the Surface layer when combined with surface-tinted and surface-active.
  • surface-active can be used for active states for elements or to strengthen the hierarchy in the Surface layer together with surface-tinted and surface-hover.
surface-tinted
Red
Orange
Yellow
Green
Teal
Blue
Purple
Shows how Surface-tinted looks in different color scales.

Border

Border colors are used to color frames (strokes) of elements.

  • border-subtle has low contrast against background and surface colors and should only be used for decorative purposes. Common use cases are dividing lines and decorative frames. The color should not be the only visual indicator that an element is interactive.
  • border-default is used on form components or on other meaningful frames.
  • border-strong has higher contrast than border-default and can be used on frames to make elements extra visible.
border-subtle
Red
Orange
Yellow
Green
Teal
Blue
Purple
border-default
Red
Orange
Yellow
Green
Teal
Blue
Purple
Shows how Border-subtle and Border-default look in different color scales.

Text

Text colors are used for text and icons.

  • text-subtle is a light text color that can be used to create variation in typography or to indicate hierarchical levels of importance. It also tries to preserve as much of the color saturation from the original color chosen in the Theme Builder.
  • text-default is a text color with high contrast, optimal for readability. It should be used for the main content and the primary text on a page. This color in the Neutral variant can be a nice color to use for most of the text.
text-default
Red
Orange
Yellow
Green
Teal
Blue
Purple
text-subtle
Red
Orange
Yellow
Green
Teal
Blue
Purple
Shows how Text-default and Text-subtle look in different color scales.

Base

Base colors are used to color solid backgrounds, such as buttons and other interactive elements. The colors help direct attention to important design elements and establish a visual hierarchy in relation to less prominent elements. At the same time, they create contrast against background and surface colors, which enhances readability and visual clarity.

The base-hover and base-active colors are generated based on the lightness or darkness of the base-default color to create smooth visual transitions between states. base-contrast-default becomes either white or black, depending on which gives the best contrast against the base colors. base-contrast-subtle goes in the same direction.

  • base-default can be used to color solid backgrounds of elements. The color (hex code) chosen in the theme builder is placed under base-default.
  • base-hover can be used for hover states for solid elements or to create visual hierarchies in the Base layer when combined with base-default and base-active.
  • base-active can be used for active states for solid elements or to strengthen the hierarchy in the Base layer together with base-default and base-hover.
  • base-contrast-subtle and base-contrast-default are used as text and icon colors on top of the base colors from the same color scale. See the "Minimum contrast" column in the table above for which base colors they can be used on.
base-default
Red
Orange
Yellow
Green
Teal
Blue
Purple
Shows boxes with Base-default as background and Base-contrast-default as text color.

To better understand how the colors work, you can see how different color scales look in the Designsystemet Theme Builder.

Edit this page on github.com (opens in a new tab)