Open
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
The Material Theme Builder generates slots 5 and 15 in the color palettes.

These should be allowed to be included in the color palettes even if they are not used by Angular Material.
However when I try to include those slots in a theme for Angular Material, the sass complier errors with "Expected $config.primary to be a valid M3 palette". The error is generated by
andThe validation checks should only fail on required (i.e. used by Angular Material) slots.
Reproduction
StackBlitz link:
Steps to reproduce:
- Generate a theme using
ng generate @angular/material:theme-color
- In any of the color palettes, add an extra value to the map, e.g.
5: #1e0037
. ng build
Expected Behavior
The build completes without error.
Actual Behavior
The build failed with error.
✘ [ERROR] (Expected $config.primary to be a valid M3 palette. Got: (0: #000000, 5: #1e0037, ... )))
51 │ definition.define-colors($color));
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/@angular/material/core/tokens/_m3-system.scss 51:13 theme()
Environment
- Angular: 19.2.5
- CDK/Material: 19.2.7