mescla.plotting.theme¶
Colours and mark specifications for Mescla figures.
The palette is validated, not chosen by eye. Values come from a design system whose categorical order was checked with an OKLab colour-vision-deficiency validator; the results relevant here are:
Slots 1-3 (blue, orange, aqua) clear the all-pairs gates in both light and dark mode – worst CVD Delta E 9.2 light / 9.4 dark against a >= 8 target, worst normal-vision Delta E 24.0 light / 20.9 dark against a >= 15 floor.
Beyond three, no ordering of this palette clears the all-pairs floors. Scatter plots put every pair on screen at once, so in Mescla identity is carried by marker shape and a direct text label, with colour as redundant reinforcement. That is both good practice in mixing diagrams – end-members are always named on the figure – and what keeps the fourth and later end-members legible.
For stacked and bar charts only adjacent pairs touch, and the full eight-slot order clears those gates, so
STACK_COLORSmay use all eight.
Marks follow the same source: thin strokes, solid hairline grids one shade off the surface, no dashed gridlines, a surface-coloured ring on overlapping markers, and no value printed on every point.
Functions
Apply the recessive chrome: hairline solid grid, no top/right spines. |
|
Resolve a theme by name, or pass one through. |
|
Colour for series |
Classes
A validated set of colours for one background mode. |