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 color parameter in URL is not effective #355

Open wangweixuan opened 2 weeks ago

wangweixuan commented 2 weeks ago

Describe the bug The error parameter in URL, e.g. https://material-foundation.github.io/material-theme-builder/?error=%2300ff00, is not effective like primary or secondary parameters.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://material-foundation.github.io/material-theme-builder/?primary=%2300ff00
  2. See that the primary color is #00ff00, as is specified in the URL.
  3. Go to https://material-foundation.github.io/material-theme-builder/?error=%2300ff00
  4. See that the error color remains the default color.

The "Copy link" button on the export page generates links like http://material-foundation.github.io?primary=%23B33B15&error=%2300FF00&colorMatch=false, which suggests that the error parameter should work. (The link itself does not work due to #338.)

Expected behavior The chosen error color should be recovered after opening the link.