Created
December 22, 2013 04:10
-
-
Save jasdev/8078410 to your computer and use it in GitHub Desktop.
quick python to generate the optimum set of RBG values for a set of size COUNT. This uses the technique outlined in this post http://gamedev.stackexchange.com/questions/46463/is-there-an-optimum-set-of-colors-for-10-players
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colors = [] | |
for i in range(0, COUNT): | |
colors.append(colorsys.hsv_to_rgb(fmod(i * 0.618033988749895, 1.0), 0.5, 1.0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment