Skip to content
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

[Vis colors] Update color mapping to rotate categorical colors instead of using tints and shades #4697

Closed
Tracked by #4318
joshuarrrr opened this issue Aug 8, 2023 · 0 comments · Fixed by #4890
Closed
Tracked by #4318
Assignees

Comments

@joshuarrrr
Copy link
Member

joshuarrrr commented Aug 8, 2023

In the long term, we probably want to remove or thoroughly rethink the visualization categorical color mapping (see #4466). But in the short term, as part of the next theme and look and feel changes targeting the 2.10.0 and 2.11.0 releases, we want to make sure the existing color mapper chooses good values.

In #4398, we replaced a bespoke color generating utility with the standardized ouiPaletteColorBlind() function from OUI, for much more consistent colors. One problem this introduced however, is that the more rotations you pass that function, the more very light and very dark variations it produces, which don't generally look good (unless they're added alongside the primary values, such as in a visualization with > 10 series). In contrast, the previous color generator was not good at producing distinguishable colors, but it did produce colors with roughly the same luminosity.

So we want to keep the OUI palette colors, but avoid the light and dark rotations. So instead of rotating, we'll only assign one of the 10 primary visualization colors of ouiPaletteColorBlind(). (Option 2 of #4466). We've previously also considered opensearch-project/oui#856, but this is likely both simpler and better.

Note that we may want to further iterate on this solution and make sure every visualization starts with ouiPaletteColorBlind()[0], but that's out of scope for this issue, which is just about avoiding bad rotated variations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
1 participant