You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to create a theme with three extra colors for these extra states: "warn", "info" and "success".
As stated in the MD3 guidelines, custom colors should be harmonized with the rest of the palette but the generated tonal palette is not equal to the one generated by the MD3 Theme Builder.
To Reproduce
// My primary color is the default one of the MD3 Theme BuilderHctprimary = Hct.from(298.980997210704, 47.8565263749703, 40.08324408746242); // Also HEX: #6750a4Hctsuccess = Hct.from(145.74707292816973, 53.04624876358251, 40.46292958087737); // Also HEX: #1C6E25// Then armonize the success colorintharmonized = Blend.harmonize(success.toInt());
// Then generate TonalPalette as shown on the MD3 Theme Builderint[] tones = newint[]{100, 99, 98, 95, 90, 80, 70, 60, 50, 40, 35, 30, 25, 20, 15, 10, 5, 0};
TonalPalettehmzPalette = TonalPalette.fromInt(harmonized);
Map<Integer, String> colors = newLinkedHashMap<>();
for (inttone : tones) {
// Colors are also converted to HEX strings with no alphacolors.put(tone, Utils.toHexNoAlpha(hmzPalette.tone(tone)));
}
// Print the map
Expected behavior
I expect TonalPalette to generate the same colors or at least to be much more precise as the colors shown by the MD3 Theme Builder. If I'm doing something wrong, then I expect the documentation here on this repository or on the MD3 guidelines website to be more precise
Notes
I tested this primarily in Java, but I think the issue is present in all the other languages too
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to create a theme with three extra colors for these extra states: "warn", "info" and "success".
As stated in the MD3 guidelines, custom colors should be harmonized with the rest of the palette but the generated tonal palette is not equal to the one generated by the MD3 Theme Builder.
To Reproduce
The results are:
Tones from 90 to 50 are not right.
Expected behavior
I expect TonalPalette to generate the same colors or at least to be much more precise as the colors shown by the MD3 Theme Builder. If I'm doing something wrong, then I expect the documentation here on this repository or on the MD3 guidelines website to be more precise
Notes
I tested this primarily in Java, but I think the issue is present in all the other languages too
The text was updated successfully, but these errors were encountered: