API Reference Pote v#3.0.0

Copy Markdown View Source

Modules

Pote — canonical color types, default palette, and top-level helpers.

Color-blindness simulation helpers.

Structured representation of a color in all supported formats.

Unified map of basic color names to RGB values.

Color conversion module.

Advanced color conversions for special color spaces.

Conversions to/from CMYK.

Conversions to/from HSL.

Conversions to/from HSV.

Conversions to/from HWB (Hue, Whiteness, Blackness).

Conversions to/from RGB.

Conversions to/from XTerm256.

Typed error returned by Pote APIs that parse or validate structured input (currently theme JSON loading).

Behaviour for color format handlers.

ARGB format for colours ({a, r, g, b}).

Atom format for colours by name.

CMYK format for colours ({c, m, y, k}). All values: 0-100 (%)

HSL format for colours ({h, s, l}). h: 0-360 (degrees), s: 0-100 (%), l: 0-100 (%)

HSV format for colours ({h, s, v}). h: 0-360 (degrees), s: 0-100 (%), v: 0-100 (%)

Hex format for colours (#RRGGBB).

RGB format for colours ({r, g, b}).

XTerm256 format for colours (0-255).

Linear and multi-stop color gradient generation.

Color harmony generation based on color theory principles.

Color orchestration module for parsing, converting, and formatting colors.

Parses color inputs from various formats into normalized RGB tuples.

Procedural palette generation.

Handles cleaning user input for colour formats.

Inline styling DSL — compose foreground, background and text effects into an immutable %Pote.Style{} struct, then render text with ANSI escapes.

A theme system that any host application can opt into.

Runtime theme operations for host modules using Pote.Theme.

Built-in theme templates that ship with Pote.

The theme struct — name, optional description, and the colour map.

Validates color format values against their specification.

Bracket-style detection for color format strings.

CMYK color string validation.

HSL and HSV color string validation.

HWB (Hue-Whiteness-Blackness) color string validation.

Hex color string validation.

Internal parser helpers used by Pote.Validator.

RGB and ARGB color string validation.

Theme color name validation.

XTerm256 color index validation.