CPT is short for Color Palette Table, a file format popularized by the Generic Mapping Tools (GMT) for defining colormaps as piecewise-constant color bands between numeric boundaries. And many helpers ...
from colorpicker import * items = [ ("item 1", "xkcd:spruce"), ("item 2", "xkcd:dark mint green"), ("item 3", "xkcd:spearmint"), ("item 4", None), ] fig, ax = plt ...