Skip to content

Instantly share code, notes, and snippets.

@marc-gist
Created April 22, 2013 12:20
Show Gist options
  • Save marc-gist/5434518 to your computer and use it in GitHub Desktop.
Save marc-gist/5434518 to your computer and use it in GitHub Desktop.
chart colors and python cycle
#list of colors good for charts/graphs etc.
colors = (["#FF0F00", "#FF6600", "#FF9E01", "#FCD202", "#F8FF01", "#B0DE09", "#04D215", "#0D8ECF", "#0D52D1",
"#2A0CD0", "#8A0CCF", "#CD0D74", "#754DEB", "#DDDDDD", "#999999", "#333333"])
#cycle through them in python
from itertools import cycle
cyc = cycle(colors)
cyc.next() #returns the next code in the list per call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment