Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Update code snippet in docs for custom color palette #32946

8 changes: 8 additions & 0 deletions docs/data/material/customization/palette/palette.md
Expand Up @@ -87,6 +87,14 @@ const theme = createTheme({
// dark: will be calculated from palette.secondary.main,
contrastText: '#ffcc00',
},
// All tokens need to be provided for custom colors if this
// color is going to be used as a prop in the Material UI's components
ZeeshanTamboli marked this conversation as resolved.
Show resolved Hide resolved
custom: {
light: '#ffa726'
main: '#f57c00',
dark: '#ef6c00',
contrastText: 'rgba(0, 0, 0, 0.87)',
}
// Used by `getContrastText()` to maximize the contrast between
// the background and the text.
contrastThreshold: 3,
Expand Down