Palettes¶
palettes
¶
Built-in categorical/qualitative palettes: short lists of colors meant to
be distinct, unlike a pyplotrs.colormaps continuous map.
Curated from matplotlib (tab10/tab20/tab20b/tab20c, the
ColorBrewer qualitative sets Set1-Set3/Pastel1-Pastel2/
Dark2/Accent/Paired, and okabe_ito), colorcet's glasbey
family (cet_glasbey* - large, maximally-distinct sets for many
categories), and seaborn's named palettes (sns_deep/sns_muted/
sns_bright/sns_pastel/sns_dark/sns_colorblind)::
from pyplotrs import palettes, themes
palettes.available() # ['Accent', 'Dark2', ..., 'tab20c']
palettes.get("tab10") # ((31, 119, 180, 255), (255, 127, 14, 255), ...)
# Use directly as a theme's cycling palette:
mine = themes.default.with_(palette=palettes.get("tab10"))
The theme's own default cycle (Okabe-Ito, colorblind-safe by construction) is
unaffected - see Theme.
get
¶
The colors of a built-in palette, as opaque RGBA tuples.