Jet
BuyFollow on X
  • Home
  • Satisfied Requirements
  • License
  • Architecture
    • Overview
    • Internal Dependency Graph
    • External Dependencies
    • Conventions
  • Recipes
    • Get Started
    • Add a Page
    • Customise Fonts
    • Customise Icons
    • Customise Languages
    • Customise Themes
    • Add an Environment Variable
  • Classes
    • Jet Mat Paginator Intl
    • Transloco HTTP Loader
  • Components
    • App Component
    • Footer Component
    • Home Page Component
    • Message Page Component
    • Not Found Page Component
    • Page Component
    • Profile Page Component
    • Reset Password Page Component
    • Settings Page Component
    • Sign In Page Component
    • Sign Out Page Component
    • Sign Up Page Component
    • Update Password Page Component
  • Constants
    • Color Scheme Options
    • Default Color Scheme Option
    • Default Language Option
    • Default Settings
    • Language Options
    • Navigation Menu Items
  • Directives
    • Analytics Directive
  • Enums
    • Bucket
    • LocalStorage Key
    • Query Param
    • SessionStorage Key
    • Table
  • Guards
    • Is Authenticated
    • Is Not Authenticated
  • Interfaces
    • Color Scheme Option
    • Language Option
    • Navigation Menu Item
    • Profile
    • Progress Bar Configuration
    • Settings
  • Services
    • Alert Service
    • Analytics Service
    • Logger Service
    • Profile Service
    • Progress Bar Service
    • Service Worker Service
    • Settings Service
    • Storage Service
    • Supabase Service
    • Toolbar Title Service
    • User Service
  • Types
    • Available Color Scheme
    • Available Font
    • Available Language
    • Available OAuth Provider
Powered by GitBook
On this page

Was this helpful?

  1. Recipes

Customise Themes

PreviousCustomise LanguagesNextAdd an Environment Variable

Last updated 8 months ago

Was this helpful?

Let's update the default theme to a light theme with maroon as the primary color and orange as the secondary. Use the to get the color values or use your own. is also a great tool to do this.

Step 1: Add palettes to styles.scss.

styles.scss
$jet-maroon-palette: (
  50: #f8e6e8,
  100: #edc1c4,
  200: #d18885,
  300: #bb5c58,
  400: #bc3a33,
  500: #b92617,
  600: #ac1c17,
  700: #9c1313,
  800: #8f0b0c,
  900: #800000,
  contrast: (
    50: #000000,
    100: #000000,
    200: #000000,
    300: #ffffff,
    400: #ffffff,
    500: #ffffff,
    600: #ffffff,
    700: #ffffff,
    800: #ffffff,
    900: #ffffff,
  ),
);

$jet-orange-palette: (
  50: #fff3de,
  100: #ffe0ae,
  200: #ffcb78,
  300: #ffb640,
  400: #ffa600,
  500: #ff9600,
  600: #fc8a00,
  700: #f77900,
  800: #f26800,
  900: #e94b00,
  contrast: (
    50: #000000,
    100: #000000,
    200: #000000,
    300: #ffffff,
    400: #ffffff,
    500: #ffffff,
    600: #ffffff,
    700: #ffffff,
    800: #ffffff,
    900: #ffffff,
  ),
);

Step 2: Update the $default-theme variable to include these palettes.

styles.scss
$default-theme: mat.define-light-theme(
  (
    color: (
      primary: mat.define-palette($jet-maroon-palette, 900),
      accent: mat.define-palette($jet-orange-palette, 400),
    ),
    typography: $noto-sans-typography,
  )
);

Done!

Material Palette Generator
http://mcg.mbitson.com
Material Palette Generator
Jet in custom theme
Material Palette Generator
Jet in custom theme