Skip to content

Instantly share code, notes, and snippets.

@owrrpon
Last active June 3, 2021 21:11
Show Gist options
  • Save owrrpon/307f3d6fcdb6ca6dece621ed1af36283 to your computer and use it in GitHub Desktop.
Save owrrpon/307f3d6fcdb6ca6dece621ed1af36283 to your computer and use it in GitHub Desktop.
adding custom palette to Angular Material
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$modhyobitto-palette: (
50: #f1f8e9,
100: #dcedc8,
200: #c5e1a5,
300: #aee571,
400: #9ccc65,
500: #8bc34a,
600: #7cb342,
700: #689f38,
800: #558b2f,
900: #4b830d,
contrast: (
50: black,
100: black,
200: black,
300: black,
400: black,
500: black,
600: black,
700: white,
800: white,
900: white
)
);
$modhyobitto-warn-palette: (
50: #fdeaee,
100: #fbcad2,
200: #ea959b,
300: #de6c74,
400: #e84853,
500: #ed323b,
600: #de2839,
700: #cc1d33,
800: #bf152c,
900: #b00020,
contrast: (
50: black,
100: black,
200: black,
300: black,
400: black,
500: black,
600: white,
700: white,
800: white,
900: white
)
);
$modhyobitto-angular-primary: mat.define-palette($modhyobitto-palette, 600, 300, 900);
$modhyobitto-angular-accent: mat.define-palette($modhyobitto-palette, 900, 300, 600);
// The warn palette is optional (defaults to red).
$modhyobitto-angular-warn: mat.define-palette($modhyobitto-warn-palette, 900);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment