Skip to main content
Default Gray Amethyst

Color

Modes UI provides palettes for UI, data and highlight colors. Some colors are still missing from the documentation here.

Color tokens are generally referenced using the --mo-color-{name}-{n} CSS custom property, where {name} is the name of the palette and {n} is the numeric value of the desired swatch. However, for status colors the naming is more semantic, i.e., instead of a number the swatch {n} is the name of the status.

Primary UI color tokens (Default theme)

UI tokens give you a semantic way to reference colors in your app. The primary palette is the main contributor in theme coloring, while the secondary palette is generally is different shades/variations of the primary colors.

Primary
--mo-color-primary-{n}
7
100
Secondary
--mo-color-secondary-{n}
15
30
70
90

Neutral color palette

The neutral color palette provides a set of neutral colors that can be used in addition to the primary color palette when you need a shade that is not included in the primary palette. For example some of them are used on this documentation page as secondary-90 is too dark for certain uses, and neutral-98 works better as a very subtle background.

Neutral (light) --mo-color-neutral-{n}
Neutral (dark) --mo-color-neutral-{n}

Custom themes

Custom themes use a different set of colors on top of the default ones, here is an example of the Amethyst theme color set.

Primary (Amethyst, light) --mo-color-primary-{n}
Primary (Amethyst, dark) --mo-color-primary-{n}

Brand color tokens

Brand color tokens are dictated by the Metso branding team, and should remain consistent across different themes and products.

Brand
--mo-color-brand-{n}
black
white
orange

Status color tokens

Status colors should be used to indicate the outcome or current status of an operation. Warning and alert tokens should be chosen based on severity of issue.

The status colors now (since v2.7.0) include all the different shades, and certain shades are assigned to more specific, semantic tokens as shown below. The first primary variant is a prominent variant for situations where the status needs to be emphasized. And the on-primary token refers to the color that content inside/on the status indicator should be in.

The -container and -on-container variants should be used where the status does not need to be emphasized as much. Alerts should always be prominent, see the Alert & Toast for an example.

Success
--mo-color-status-{n}
success
on-success
success-container
on-success-container
Warning
--mo-color-status-{n}
warning
on-warning
warning-container
on-warning-container
Alert
--mo-color-status-{n}
alert
on-alert
alert-container
on-alert-container
Info
--mo-color-status-{n}
info
on-info
info-container
on-info-container

Data color tokens

The categorical data color palette helps the user distinguish between different categories of data. The order of colors should remain as shown, to maximize the contrast between neighboring colors.

Data
--mo-color-data-{n}

Highlight color tokens

Highlight color tokens can be used in various situations to highlight certain content. Only use these when there is a clear need for them, the UI tokens are recommended in most cases.

Highlight
--mo-color-highlight-{n}
1-default
1-lighter
1-darker
2-default
2-lighter
2-darker
3-default
3-lighter
3-darker
4-default
4-lighter
4-darker
5-default
5-lighter
5-darker
6-default
6-lighter
6-darker