Comments (4)
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.
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)
- bug(Angular Youtube player: Cannot read properties of null (reading 'src') HOT 2
- -ms-high-constrast is in the process of being deprecated HOT 3
- feat(badge): Add support for M3 small badges
- bug(badge): Large size setting looks the same as medium HOT 1
- bug(Theming): having multiple theme files causes :root css variables to persist upon unloading previous theme and loading new one HOT 1
- bug(Dialog): Dialog don't follow M3 specs HOT 4
- bug(theme): using custom neutral color in custom theme schematic causes select form field to be transparent HOT 1
- bug(Overlay): overlayOutsideClick triggered when clicking into shadowDOM within overlay HOT 2
- Button text color adopts background color after upgrading to Angular Material 18 HOT 2
- bug(Datepicker): DatePicker does not emit event for `DateChange` or `DateInput` when bound form control setValue is called. HOT 2
- bug(MatBottomSheet): zoneless - Expression has changed after it was checked HOT 1
- bug(DatePicker): Keyboard focus lost after selecting first date in range (accessibility failure)
- docs-bug(Sidenav): deprecated methods used in the responsive sidenav example HOT 1
- Unable to access the controls in the "Rearrange columns" dialog with the keyboard. HOT 1
- bug(mat-tab-nav-bar): Accessibility issue with dpad navigation in mat tabs HOT 3
- bug(Dialog): @Inject(MAT_DIALOG_DATA) reference is not getting data in Micro Frontend Architecture HOT 1
- docs-bug(@angular/google-maps): map-info-window
- docs-bug(mat-table): Example suggesting to use max-width to set column width is misleading HOT 1
- mat-form-field height exceeds parent height for multiline inputs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from components.