-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How is neutral color created? #58
Comments
This is the piece of code, that generates the colour palettes. const hct = Hct.fromInt(argb);
const hue = hct.hue;
const chroma = hct.chroma;
this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));
this.a2 = TonalPalette.fromHueAndChroma(hue, 16);
this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);
this.n1 = TonalPalette.fromHueAndChroma(hue, 4);
this.n2 = TonalPalette.fromHueAndChroma(hue, 8); |
So you are generating a tonal pallette with Hue (original from primary) and Chroma (4). But which tone do you use for neutral color? By looking at the theme builder, the primary color is at Tone 40 and Neutral is at 60. So Tone 60 from your |
I don't understand what the theme builder does with this neutral colour. Changing the tone of that colour just breaks the tool… In the context of dynamic colours from a single source colour, there is no semantic "neutral" colour. Here are the default colour palettes (I think this is a hue of 270) and their use in the semantic colours. |
Yeah actually it doesn't matter if the key color is Tone 40 or 60. Thanks for the code and help. |
Sorry if this is not the right place to ask but I want to know how the neutral color is created. Is it hard coded to certain shade of gray or is it derived from the primary color? If so, what is the calculation for conversion between primary and neutral color?
The text was updated successfully, but these errors were encountered: