Colors and color schemes
overview
Mantine names its colors and shades with CSS variables. CSS variables start with the --mantine-color prefix.
- It defines CSS variables with the color name and the 0 to 9 digit, such as
--mantine-color-dark-0. - It also defines semantic CSS variables, such as
--mantine-color-textwhich defaults to--mantine-color-dark-0.
Some colors only trigger when we use the given variant or color prop, for example the default variant or the gray color. The general values apply when not overridden by a variant or a color.??????
dark color scheme
semantic CSS variables
Note: the suffix is appended to --mantine-color-*, such as --mantine-color-bright:
| semantic suffixes | value |
|---|---|
| bright | --mantine-color-white |
| text | --mantine-color-dark-0 |
| dimmed | --mantine-color-dark-2 |
| placeholder | --mantine-color-dark-3 |
| body | --mantine-color-dark-7 |
| anchor | --mantine-color-blue-4 |
| error | --mantine-color-red-8 |
| red-text | --mantine-color-red-4 |
| scheme | "dark" |
variant: "default" specific CSS variables
note: it comes with a border.
While the default for hover is dark-5, we can also use dark-4 or dark-6.
| semantic suffixes | value |
|---|---|
| default-color | --mantine-color-white |
| default | --mantine-color-dark-6 |
| default-hover | --mantine-color-dark-5 |
| default-border | --mantine-color-dark-4 |
color: "dark" specific CSS variables
it comes with values for several variants. It has no border.
| semantic suffixes | value |
|---|---|
| dark-text | --mantine-color-dark-4 |
| dark-filled | --mantine-color-dark-8 |
| dark-filled-hover | --mantine-color-dark-7 |
| dark-light | rgba(36, 36, 36, 0.15) |
| dark-light-hover | rgba(36, 36, 36, 0.2) |
| dark-light-color | --mantine-color-dark-3 |
| dark-outline | --mantine-color-dark-4 |
| dark-outline-hover | rgba(36, 36, 36, 0.05) |
color: "gray" specific CSS variables
it comes with values for several variants.
| suffix | value |
|---|---|
| gray-text | --mantine-color-gray-4 |
| gray-filled | --mantine-color-gray-8 |
| gray-filled-hover | --mantine-color-gray-9 |
| gray-light | rgba(134, 142, 150, 0.15) |
| gray-light-hover | rgba(134, 142, 150, 0.2) |
| gray-light-color | --mantine-color-gray-3 |
| gray-outline | --mantine-color-gray-4 |
| gray-outline-hover | rgba(206, 212, 218, 0.05) |