material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
417 stars 30 forks source link

Error palette not exported to JSON #321

Open tipa opened 5 months ago

tipa commented 5 months ago

Describe the bug When exporting to JSON, the error palette is missing, even though it is displayed on the theme builder

To Reproduce Steps to reproduce the behavior:

  1. Go to https://material-foundation.github.io/material-theme-builder/
  2. Click on the export button on the top right
  3. Click "Export" -> "Material Theme (JSON)"
  4. Open downloaded JSON
  5. The JSON contains the "primary", "secondardy", "tertiary", "neutral" & "neutral-variant" palette, but not the "error" palette

Expected behavior The JSON contains the error palette

Screenshots image

Additional context I want to programmatically generate my Android themes based on the JSON, mostly because exporting the Android XML is bugged. See these issues for context: https://github.com/material-foundation/material-theme-builder/issues/308, https://github.com/material-foundation/material-theme-builder/issues/313