Replies: 2 comments 7 replies
-
I dont think you can use values like red.5 for virtualColor. value should be a key of the color like "red". if you want to attach color like that to your component, you should use useColorScheme inside your custom component: https://mantine.dev/hooks/use-color-scheme/#usage |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have set of colors defined in theme Object, I want to add design tokens which will reference these colors for light and dark mode. I am trying to use
virtualColor
function to define different values for light and dark color schemes.As of now
virtualColor
defaults to whatever theprimarySade
value is set for any theme.color key. Is there a way to reference different shade values for light and dark color schemes?If this is not possible, What is the best way to implement this workflow?
// theme.ts
// page.tsx
Beta Was this translation helpful? Give feedback.
All reactions