Switch to infinite scroll (Full book)

Color shades and aliases

overview

Mantine uses CSS variables to define color shades. CSS variables start with the --mantine-color prefix.

  • Mantine defines 14 colors.
  • Mantine defines 10 shades for each color, 0 to 9, following the pattern of --mantine-color-dark-0.
  • It defines aliases, or semantic CSS variables, such as --mantine-color-text, which resolve to a given shade, such as --mantine-color-dark-0.
    • The resolved value depends on the active color scheme: dark or light (see below).

Some aliases are linked to a specific variant. For example, --mantine-color-default is linked to the default variant, and defines its background color.

dark color-scheme values

The aliases resolve to the following values:

semantic suffixesvaluenote
--mantine-color-bright--mantine-color-whitetext
-text--mantine-color-dark-0text
-dimmed--mantine-color-dark-2text
-placeholder--mantine-color-dark-3text
-body--mantine-color-dark-7background
-anchor--mantine-color-blue-4link
-error--mantine-color-red-8form error
-red-text--mantine-color-red-4?
-scheme"dark"

variant: "default" aliases

note: it comes with a border.

While the default for hover is dark-5, we can also use dark-4 or dark-6.

semantic suffixesvaluenote
default-color--mantine-color-whitetext
default--mantine-color-dark-6background
default-hover--mantine-color-dark-5background
default-border--mantine-color-dark-4border

color: "dark" aliases

it comes with values for several variants. It has no border.

semantic suffixesvalue
dark-text--mantine-color-dark-4
dark-filled--mantine-color-dark-8
dark-filled-hover--mantine-color-dark-7
dark-lightrgba(36, 36, 36, 0.15)
dark-light-hoverrgba(36, 36, 36, 0.2)
dark-light-color--mantine-color-dark-3
dark-outline--mantine-color-dark-4
dark-outline-hoverrgba(36, 36, 36, 0.05)

color: "gray" aliases

it comes with values for several variants.

suffixvalue
gray-text--mantine-color-gray-4
gray-filled--mantine-color-gray-8
gray-filled-hover--mantine-color-gray-9
gray-lightrgba(134, 142, 150, 0.15)
gray-light-hoverrgba(134, 142, 150, 0.2)
gray-light-color--mantine-color-gray-3
gray-outline--mantine-color-gray-4
gray-outline-hoverrgba(206, 212, 218, 0.05)

light color-scheme values

earlymorning logo

Color shades and aliases

overview

Mantine uses CSS variables to define color shades. CSS variables start with the --mantine-color prefix.

  • Mantine defines 14 colors.
  • Mantine defines 10 shades for each color, 0 to 9, following the pattern of --mantine-color-dark-0.
  • It defines aliases, or semantic CSS variables, such as --mantine-color-text, which resolve to a given shade, such as --mantine-color-dark-0.
    • The resolved value depends on the active color scheme: dark or light (see below).

Some aliases are linked to a specific variant. For example, --mantine-color-default is linked to the default variant, and defines its background color.

dark color-scheme values

The aliases resolve to the following values:

semantic suffixesvaluenote
--mantine-color-bright--mantine-color-whitetext
-text--mantine-color-dark-0text
-dimmed--mantine-color-dark-2text
-placeholder--mantine-color-dark-3text
-body--mantine-color-dark-7background
-anchor--mantine-color-blue-4link
-error--mantine-color-red-8form error
-red-text--mantine-color-red-4?
-scheme"dark"

variant: "default" aliases

note: it comes with a border.

While the default for hover is dark-5, we can also use dark-4 or dark-6.

semantic suffixesvaluenote
default-color--mantine-color-whitetext
default--mantine-color-dark-6background
default-hover--mantine-color-dark-5background
default-border--mantine-color-dark-4border

color: "dark" aliases

it comes with values for several variants. It has no border.

semantic suffixesvalue
dark-text--mantine-color-dark-4
dark-filled--mantine-color-dark-8
dark-filled-hover--mantine-color-dark-7
dark-lightrgba(36, 36, 36, 0.15)
dark-light-hoverrgba(36, 36, 36, 0.2)
dark-light-color--mantine-color-dark-3
dark-outline--mantine-color-dark-4
dark-outline-hoverrgba(36, 36, 36, 0.05)

color: "gray" aliases

it comes with values for several variants.

suffixvalue
gray-text--mantine-color-gray-4
gray-filled--mantine-color-gray-8
gray-filled-hover--mantine-color-gray-9
gray-lightrgba(134, 142, 150, 0.15)
gray-light-hoverrgba(134, 142, 150, 0.2)
gray-light-color--mantine-color-gray-3
gray-outline--mantine-color-gray-4
gray-outline-hoverrgba(206, 212, 218, 0.05)

light color-scheme values