Colour#
- class discopy.monoidal.Colour(name, label=None)[source]#
Bases:
discopy.cat.ObA 0-cell, drawn using its matplotlib-compatible
name. A region with no colour isNone, drawn as the page.An optional
labelgives the region a human-readable name for the drawing legend (e.g. a category) while still filling withname. It is ignored for equality and hashing, so two regions with the same fill colour still merge.- Parameters:
name (str)
label (str | None)
- property legend_label: str#
The name shown for this colour in a drawing legend.