aryagraph.style.themes.Theme#

class aryagraph.style.themes.Theme(name: str, mode: str, background: str, surface: str, ink: str, ink_secondary: str, ink_muted: str, grid: str, axis: str, border: str, node_fill: str, node_ring: str, node_ring_width: float, edge: str, edge_opacity: float, edge_highlight: str, dim_opacity: float, categorical: tuple[str, ...], other: str, status: dict[str, str], sequential: str, diverging_pair: tuple[str, str], font: str = 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Vazirmatn", sans-serif', mono: str = 'ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace', font_size: float = 12.0, label_size: float = 11.5, title_size: float = 17.0, subtitle_size: float = 12.5, label_weight: int = 500, title_weight: int = 600, node_size: float = 14.0, edge_width: float = 1.25, arrow_size: float = 8.0, corner_radius: float = 6.0, padding: float = 24.0, extras: dict[str, ~typing.Any] = <factory>)[source]#

Bases: object

A complete visual vocabulary. Create variants with with_().

with_(**changes: Any) → Theme[source]#

Copy with some fields replaced: theme.with_(font_size=14, edge='#999').

series(i: int) → str[source]#

Categorical slot i (0-based). Slots are never cycled; callers fold past the last.

role_color(role: str) → str[source]#

Color for a semantic role: neutral, muted, accent, or a status name.

css_vars() → dict[str, str][source]#

Role → value map used by the HTML backend’s CSS custom properties.