Styling#
Themes, colors, colormaps, encodings and node shapes (aryagraph.style).
Themes#
A complete visual vocabulary. |
|
Resolve a theme name ( |
|
Make theme available by name to every |
Encodings#
Explicit encoding spec. |
|
What a renderer needs to draw one legend block. |
|
Encoding shorthand#
Colors and colormaps#
A continuous color scale over [0, 1], interpolated in OKLab between stops. |
|
Parse a CSS color (hex, |
|
Canonical lowercase hex ( |
|
Interpolate from c1 (t=0) to c2 (t=1) in OKLab (alpha linearly). |
|
Raise OKLCH lightness by amount (0–1 scale), keeping hue and chroma. |
|
WCAG contrast ratio in [1, 21]. |
|
Whichever of light / dark text contrasts more with background. |
|
Text color for a short label set inside a solid colored mark. |
Palettes#
Look up a colormap by name. |
|
Two opposing hue arms through a neutral gray midpoint (equal steps per arm). |
|
Shapes#
Text#
Estimated rendered width in pixels of a single line of text at font size. |
|
Break text into lines no wider than max_width. |
|
text, cut and suffixed with an ellipsis if it is wider than max_width. |
|
True when text contains right-to-left script (Arabic, Persian, Hebrew…). |