We are updating our MUI material UI theme to follow version 6 recommendations and stumbled upon the documentation that colorSchemes is the preferred way going forward. I adjusted my theme with light and dark themes palettes but we have some custom colors we like to augment. The documentation on augmentColors specifies to use the initial theme to create an updated theme with createTheme(theme, {...}) where you specify the custom colors. But I don't get it to work with dark and light theme palettes for these custom colors as specifying just palette on the second theme creation overrides the initial theme as stated in the documentation and spreading theme.colorSchemes.light.palette gives TypeScript errors that Theme doesn't have this property.
Can someone help me to find a way to get custom augmented colors to work with colorSchemes for light and dark?
Search keywords:
We are updating our MUI material UI theme to follow version 6 recommendations and stumbled upon the documentation that colorSchemes is the preferred way going forward. I adjusted my theme with light and dark themes palettes but we have some custom colors we like to augment. The documentation on augmentColors specifies to use the initial theme to create an updated theme with createTheme(theme, {...}) where you specify the custom colors. But I don't get it to work with dark and light theme palettes for these custom colors as specifying just palette on the second theme creation overrides the initial theme as stated in the documentation and spreading theme.colorSchemes.light.palette gives TypeScript errors that Theme doesn't have this property.
Can someone help me to find a way to get custom augmented colors to work with colorSchemes for light and dark?
Search keywords: