How to use single color array in theme? #6338
-
Hi, my theme only consists of 6 colors. I noticed each array requires at least 10 colors. How should this be handled? Is there a better way than this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You need 10 shades per color for Mantine color themes to work properly. As the documentation states it:
I would suggest using the color generator to create 10 standard shades out of your original color and placing them into the array. |
Beta Was this translation helpful? Give feedback.
You're welcome, if the answer helped you, please mark it as answered so it gets closed.
For the second part, it depends on the usage. For each color, Mantine is going to create CSS custom properties known as CSS variables for each shade.
For the primary color it is going to create some other custom properties like:
For the fun part, it creates tw…