import { createTheme, ThemeProvider, alpha, getContrastRatio, } from '@mui/material/styles'; import Button from '@mui/material/Button'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; // Augment the palette to include a violet color // Update the Button's color options to include a violet option const violetBase = '#7F00FF'; const violetMain = alpha(violetBase, 0.7); const theme = createTheme({ palette: { violet: { main: violetMain, light: alpha(violetBase, 0.5), dark: alpha(violetBase, 0.9), contrastText: getContrastRatio(violetMain, '#fff') > 4.5 ? '#fff' : '#111', }, }, }); export default function UsingStylesUtils() { return ( light main dark ); }