You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

61 lines
1.3 KiB

  1. // material-ui
  2. import { createTheme } from '@mui/material/styles';
  3. // third-party
  4. import { presetPalettes } from '@ant-design/colors';
  5. // project import
  6. import ThemeOption from './theme';
  7. // ==============================|| DEFAULT THEME - PALETTE ||============================== //
  8. const Palette = (mode) => {
  9. const colors = presetPalettes;
  10. const greyPrimary = [
  11. '#ffffff',
  12. '#fafafa',
  13. '#f5f5f5',
  14. '#f0f0f0',
  15. '#d9d9d9',
  16. '#bfbfbf',
  17. '#8c8c8c',
  18. '#595959',
  19. '#262626',
  20. '#141414',
  21. '#000000'
  22. ];
  23. const greyAscent = ['#fafafa', '#bfbfbf', '#434343', '#1f1f1f'];
  24. const greyConstant = ['#fafafb', '#e6ebf1'];
  25. colors.grey = [...greyPrimary, ...greyAscent, ...greyConstant];
  26. const paletteColor = ThemeOption(colors);
  27. return createTheme({
  28. palette: {
  29. mode,
  30. common: {
  31. black: '#000',
  32. white: '#fff'
  33. },
  34. ...paletteColor,
  35. text: {
  36. primary: paletteColor.grey[700],
  37. secondary: paletteColor.grey[500],
  38. disabled: paletteColor.grey[400]
  39. },
  40. action: {
  41. disabled: paletteColor.grey[300]
  42. },
  43. divider: paletteColor.grey[200],
  44. background: {
  45. paper: paletteColor.grey[0],
  46. default: paletteColor.grey.A50
  47. }
  48. }
  49. });
  50. };
  51. export default Palette;