apenwarr / apenwarr/wavedroplet
Auto-assign colours to streams
Open
enhancement
- Dominant language
- Python
- Stars
- 25
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Copy of jrockway's comment: What I normally do here is look at the colors in terms of HSV. I pick a good saturation and value, and then divide 360 by the number of lines I want, and set hue = 0, 1(360/lines), 2(360/lines), ... so the colors are maximally different.
An even better algorithm would be to pick a default number, like 4, then pick the colors 90 degrees apart. Then for the next 8, divide those in two. And so on. That way the colors will be the same every time. (But in the case of 5 lines, color 0 and color 4 are awfully similar.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.