Giter VIP home page Giter VIP logo

Comments (4)

crisbeto avatar crisbeto commented on June 30, 2024

It looks like the neutral palette is incomplete which was fixed in version 18.0.3 by #29231. I just tried it against a new project and it worked properly. Can you double-check that you're using @angular/material at 18.0.3 or above? You may have to clear your node_modules and install from scratch. For reference, here's the theme I got when I generated it from the same colors (note the neutral palette specifically):

@use 'sass:map';
@use '@angular/material' as mat;

// Note: Color palettes are generated from primary: #347EFF, secondary: #bfc6dc, tertiary: #D0A600, neutral: #76777d
$_palettes: (
  primary: (
    0: #000000,
    10: #001944,
    20: #002d6d,
    25: #003783,
    30: #00429a,
    35: #004db1,
    40: #0058c9,
    50: #1e71f1,
    60: #548dff,
    70: #84aaff,
    80: #afc6ff,
    90: #d9e2ff,
    95: #edf0ff,
    98: #faf8ff,
    99: #fefbff,
    100: #ffffff,
  ),
  secondary: (
    0: #000000,
    10: #001a42,
    20: #002e6b,
    25: #003880,
    30: #13448f,
    35: #24509b,
    40: #335ca8,
    50: #4e76c3,
    60: #6990df,
    70: #84aafc,
    80: #aec6ff,
    90: #d8e2ff,
    95: #edf0ff,
    98: #faf9ff,
    99: #fefbff,
    100: #ffffff,
  ),
  tertiary: (
    0: #000000,
    10: #241a00,
    20: #3d2f00,
    25: #4a3900,
    30: #584400,
    35: #665000,
    40: #745b00,
    50: #927300,
    60: #b08c00,
    70: #d0a600,
    80: #eec12c,
    90: #ffe08b,
    95: #ffefcd,
    98: #fff8f1,
    99: #fffbff,
    100: #ffffff,
  ),
  neutral: (
    0: #000000,
    4: #000a1a,
    6: #001026,
    10: #001a40,
    12: #001e48,
    17: #00295c,
    20: #002f68,
    22: #003370,
    24: #003778,
    25: #00397c,
    30: #0b458e,
    35: #1f519b,
    40: #2f5da8,
    50: #4b76c2,
    60: #6690de,
    70: #81abfb,
    80: #acc7ff,
    87: #cadaff,
    90: #d7e2ff,
    92: #e0e8ff,
    94: #e9edff,
    95: #edf0ff,
    96: #f1f3ff,
    98: #f9f9ff,
    99: #fefbff,
    100: #ffffff,
  ),
  neutral-variant: (
    0: #000000,
    10: #191b23,
    20: #2e3038,
    25: #393b43,
    30: #44464f,
    35: #50525a,
    40: #5c5e67,
    50: #757780,
    60: #8f9099,
    70: #a9abb4,
    80: #c5c6d0,
    90: #e1e2ec,
    95: #eff0fa,
    98: #faf8ff,
    99: #fefbff,
    100: #ffffff,
  ),
  error: (
    0: #000000,
    10: #410002,
    20: #690005,
    25: #7e0007,
    30: #93000a,
    35: #a80710,
    40: #ba1a1a,
    50: #de3730,
    60: #ff5449,
    70: #ff897d,
    80: #ffb4ab,
    90: #ffdad6,
    95: #ffedea,
    98: #fff8f7,
    99: #fffbff,
    100: #ffffff,
  ),
);

$_rest: (
  secondary: map.get($_palettes, secondary),
  neutral: map.get($_palettes, neutral),
  neutral-variant: map.get($_palettes,  neutral-variant),
  error: map.get($_palettes, error),
);
$_primary: map.merge(map.get($_palettes, primary), $_rest);
$_tertiary: map.merge(map.get($_palettes, tertiary), $_rest);

$light-theme: mat.define-theme((
  color: (
    theme-type: light,
    primary: $_primary,
    tertiary: $_tertiary,
  ),
));

from components.

godind avatar godind commented on June 30, 2024

Hi,

I had generated the theme with 18.0.2 and did upgrade to with 18.0.3. Rerunning theme generation did not fix it but your recommendation to clear node_modules and reinstalling did fix it.

Thank you!

from components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.