apenwarr / apenwarr/wavedroplet
Auto-assign colours to streams
Đang mở
enhancement
- Ngôn ngữ chính
- Python
- Star
- 25
- Fork
- 6
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.