Colours

Choose the right colour role for the job, and learn how to read the colour tokens.

Neutral is the foundation of any interface. It is present in nearly all components and covers backgrounds, borders and text. The palette contains white and black and all the shades in between, plus inverse shades for surfaces that flip, such as a dark panel in a light theme, and semi-transparent shades for when what is behind should show through.

Neutral colour role example showing default text, borders and backgrounds.

When to use

  • The element is part of the structure of the interface, such as a page background, a card, a divider or body text.
  • A chart element supports the data rather than representing it, such as axes, grid lines and labels. See Data visualisation colours.

When not to use

  • The element needs to stand out. Use Primary or Secondary instead.
  • The colour needs to say that something succeeded, failed or needs attention. Use a status colour instead.
  • If you are not using an MDS component, use the tokens below, not custom greys or copied colour values. They are tuned for contrast in each brand and theme.

Colour tokens

These are the Neutral tokens, with their values for the Maersk brand in the light and dark themes.

UseLightDark
Weak border
brand_appearance_neutral_weak_border-color
--mds_brand_appearance_neutral_weak_border-color
rgb(226,226,226)
#E2E2E2
rgb(54,54,54)
#363636
Border
brand_appearance_neutral_default_border-color
--mds_brand_appearance_neutral_default_border-color
rgb(212,212,212)
#D4D4D4
rgb(76,76,76)
#4C4C4C
Border, opacity
brand_appearance_neutral_default_opacity_border-color
--mds_brand_appearance_neutral_default_opacity_border-color
rgba(20,20,20,0.18)
#141414
rgba(255,255,255,0.24)
#FFFFFF
Strong border
brand_appearance_neutral_strong_border-color
--mds_brand_appearance_neutral_strong_border-color
rgb(179,179,179)
#B3B3B3
rgb(92,92,92)
#5C5C5C
Strongest border
brand_appearance_neutral_strongest_border-color
--mds_brand_appearance_neutral_strongest_border-color
rgb(54,54,54)
#363636
rgb(212,212,212)
#D4D4D4
Inverse border
brand_appearance_neutral_inverse_border-color
--mds_brand_appearance_neutral_inverse_border-color
rgb(255,255,255)
#FFFFFF
rgb(20,20,20)
#141414
Weakest background
brand_appearance_neutral_weakest_background-color
--mds_brand_appearance_neutral_weakest_background-color
rgb(247,247,247)
#F7F7F7
rgb(33,33,33)
#212121
Weak background
brand_appearance_neutral_weak_background-color
--mds_brand_appearance_neutral_weak_background-color
rgb(240,240,240)
#F0F0F0
rgb(54,54,54)
#363636
Weak background, opacity
brand_appearance_neutral_weak_opacity_background-color
--mds_brand_appearance_neutral_weak_opacity_background-color
rgba(20,20,20,0.06)
#141414
rgba(255,255,255,0.14)
#FFFFFF
Background
brand_appearance_neutral_default_background-color
--mds_brand_appearance_neutral_default_background-color
rgb(255,255,255)
#FFFFFF
rgb(20,20,20)
#141414
Strong background
brand_appearance_neutral_strong_background-color
--mds_brand_appearance_neutral_strong_background-color
rgb(226,226,226)
#E2E2E2
rgb(76,76,76)
#4C4C4C
Strongest background
brand_appearance_neutral_strongest_background-color
--mds_brand_appearance_neutral_strongest_background-color
rgb(179,179,179)
#B3B3B3
rgb(106,106,106)
#6A6A6A
Inverse background
brand_appearance_neutral_inverse_background-color
--mds_brand_appearance_neutral_inverse_background-color
rgb(20,20,20)
#141414
rgb(255,255,255)
#FFFFFF
Weakest on background
brand_appearance_neutral_weakest_on-background-color
--mds_brand_appearance_neutral_weakest_on-background-color
rgb(20, 20, 20)
#141414
rgb(240,240,240)
#F0F0F0
Weak on background
brand_appearance_neutral_weak_on-background-color
--mds_brand_appearance_neutral_weak_on-background-color
rgb(20,20,20)
#141414
rgb(240,240,240)
#F0F0F0
On background
brand_appearance_neutral_default_on-background-color
--mds_brand_appearance_neutral_default_on-background-color
rgb(20,20,20)
#141414
rgb(240,240,240)
#F0F0F0
Strong on background
brand_appearance_neutral_strong_on-background-color
--mds_brand_appearance_neutral_strong_on-background-color
rgb(20,20,20)
#141414
rgb(240,240,240)
#F0F0F0
Strongest on background
brand_appearance_neutral_strongest_on-background-color
--mds_brand_appearance_neutral_strongest_on-background-color
rgb(20,20,20)
#141414
rgb(240,240,240)
#F0F0F0
Inverse on background
brand_appearance_neutral_inverse_on-background-color
--mds_brand_appearance_neutral_inverse_on-background-color
rgb(255,255,255)
#FFFFFF
rgb(20,20,20)
#141414
Weakest text
brand_appearance_neutral_weakest_text-color
--mds_brand_appearance_neutral_weakest_text-color
rgb(106,106,106)
#6A6A6A
rgb(138,138,138)
#8A8A8A
Weak text
brand_appearance_neutral_weak_text-color
--mds_brand_appearance_neutral_weak_text-color
rgb(76,76,76)
#4C4C4C
rgb(212,212,212)
#D4D4D4
Text
brand_appearance_neutral_default_text-color
--mds_brand_appearance_neutral_default_text-color
rgb(20,20,20)
#141414
rgb(240,240,240)
#F0F0F0
Inverse text
brand_appearance_neutral_inverse_text-color
--mds_brand_appearance_neutral_inverse_text-color
rgb(255,255,255)
#FFFFFF
rgb(20,20,20)
#141414

To understand what terms such as border, background, on-background, text, weak and strong mean in a token name, see Reading the colour tokens .

See also