Qualpal
Repositories

qualpal.list_palettes

Python · python · 1.1.0

list_palettes() -> dict[str, list[str]]

List all available named color palettes.

Returns

dict[str, list[str]]

Dictionary mapping package names to lists of palette names. Use these names with the format “package:palette” when creating a Qualpal object.

Examples

>>> from qualpal import list_palettes
>>> palettes = list_palettes()
>>> 'ColorBrewer' in palettes
True
>>> print(palettes['ColorBrewer'][:3])
['Accent', 'Blues', 'BrBG']
>>> # Use with Qualpal
>>> from qualpal import Qualpal
>>> qp = Qualpal(palette='ColorBrewer:Set2')
>>> pal = qp.generate(5)