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
363 stars 28 forks source link

HCT Color Picker weird behavior #89

Closed ivanbachev closed 1 year ago

ivanbachev commented 1 year ago

Describe the bug The HCT Color Picker available on https://m3.material.io/theme-builder#/custom acts in a very unpredictable way.

To Reproduce When I click on a color from the Core colors and show the tonal palettes I then tweak the color Chroma and Tone values but these no longer produce consistent results.

Screenshots Consider the following case when the Hue preview changes unexpectedly when the Chroma value is set to 0. Note that the actual Hue value shown in the following example does not changed - but the preview does.

m3 material io_theme-builder (1) m3 material io_theme-builder

Desktop:

margeeta commented 1 year ago

Hi @ivanbachev! Thanks for the issue. This is due to the color algorithm trying to adjust when at 0, which ends up creating a blue effect instead of the desaturated version of the entered Hue. You should notice changing the chroma to 1 will usually adjust it to the proper Hue.

In this instance was the desired result monochrome or grey for tertiary?