I use MUI v5 with react and i am using new feature CSS theme variables through the new provider CssVarsProvider
https://mui.com/material-ui/experimental-api/css-theme-variables/overview/
Inside my emotion css class, i would like to access to the hexa value from the palette
I tried several way without succeed sure as:
- theme.colorSchemes[mode].palette.text.secondary (theme from useTheme and mode from useColorScheme)
- theme.vars.palette.text.secondary
- theme.getCssVar(‘palette-text-primary’)
Everytime i got the css var name and not the value setted in my palette (which is hexa value)
Is there a clean way to get that hexa value from vars?
Just an idea and i didn’t try this workaround, but i dont want to parse my whole page to get the value associated
Anyway thank by advance