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
We could make a variety of colors by generating them automatically, given country names. There are packages which allow to "hash" strings into colors, producing an (almost) unique color given a string, for example https://pypi.org/project/colorhash/
Color hashes are stable, that is, they produce the same color if given the same string.
This can produce broader variety. But also does not guarantee that colors will be easily distinguishable from each other. We might tweak them individually, by adding a "tint" to a given country, or by adding a common "salt" or an individual "pepper" to the hashed string, or by combining all.
Individual tint:
color = ColorHash('France')
color = add_tint(color, countries['France].tint)
Resolves#80
This replaces colored circles with short colored dashed lines as icons for country entries in plot tooltips and in filtering sidebar on "per variant" page. This way the countries with the same color look distinct if they have different line styles. The colors and styles mimic those in the plot.
The issue of duplicated colors still persists on "per cluster" page, which still uses circles. Using dashed lines there makes less sense, as there are not line plots on that page. Let's discuss this issue separately.
Additionally, some colors were too pale even when circles were used. And now with lines, especially dashed, these elements are almost indistinguishable from the background. This is poor user experience, especially in terms of accessibility.
Related: #81
We could make a variety of colors by generating them automatically, given country names. There are packages which allow to "hash" strings into colors, producing an (almost) unique color given a string, for example
https://pypi.org/project/colorhash/
Color hashes are stable, that is, they produce the same color if given the same string.
This can produce broader variety. But also does not guarantee that colors will be easily distinguishable from each other. We might tweak them individually, by adding a "tint" to a given country, or by adding a common "salt" or an individual "pepper" to the hashed string, or by combining all.
Individual tint:
Common salt:
Individual pepper:
Related: #80
The text was updated successfully, but these errors were encountered: