Skip to content

Instantly share code, notes, and snippets.

@jasdev
Created December 22, 2013 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/8078410 to your computer and use it in GitHub Desktop.
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
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