apenwarr / apenwarr/wavedroplet

Auto-assign colours to streams

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.