set_palette
set_palette(mode)Switch the global geometrics color palette.
The palette is process-global: it affects every subsequent geometrics figure — grouped series colors (via :func:color_for), the heatmap / scatter color scales, and the registered Plotly template’s colorway. The default look is unchanged until you opt in, so existing figures keep their colors unless you call this.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| mode | str | "default" (the Tableau 10 palette, today’s look) or "colorblind" (the Okabe-Ito colorblind-safe qualitative palette plus colorblind-safe sequential and diverging scales). |
required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If mode is not a known palette. |
Examples
Switch to the colorblind-safe palette, then restore the default:
import geometrics as gm
gm.set_palette("colorblind") # every later figure uses the Okabe-Ito palette
print(gm.get_palette())
gm.set_palette("default") # restore the Tableau 10 default