from brewer2mpl import qualitative, sequential, diverging, wesanderson, tableau
from brewer2mpl.colormap import ColorMap
def display_maps(module):
for k in dir(module):
thing = getattr(module, k)
if isinstance(thing, dict) and 'max' in thing:
thing = thing['max']
if isinstance(thing, ColorMap):
thing.show_as_blocks()
print(k)
display_maps(diverging)
BrBG
PRGn
PiYG
PuOr
RdBu
RdGy
RdYlBu
RdYlGn
Spectral
display_maps(qualitative)
Accent
Dark2
Paired
Pastel1
Pastel2
Set1
Set2
Set3
display_maps(sequential)
Blues
BuGn
BuPu
GnBu
Greens
Greys
OrRd
Oranges
PuBu
PuBuGn
PuRd
Purples
RdPu
Reds
YlGn
YlGnBu
YlOrBr
YlOrRd
for name, colormap in sorted(tableau.get_all_maps().viewitems()):
colormap.show_as_blocks()
print(name)
Blue-Red 12
Blue-Red 6
Color Blind 10
Gray 5
Green-Orange 12
Green-Orange 6
Purple-Gray 12
Purple-Gray 6
Tableau 10
Tableau 10 Light
Tableau 10 Medium
Tableau 20
Traffic Light
display_maps(wesanderson)
Cavalcanti
Chevalier
Darjeeling1
FantasticFox1
GrandBudapest1
Margot1
Margot2
Mendl
Moonrise1
Moonrise2
Moonrise3
Moonrise4
Royal1
Zissou