iridis
Chromatic pipeline for dynamic palette derivation. Pluggable, OKLCH-native, contrast-enforced. Seeds in, role-resolved palettes out.
@studnicky/iridis is a composition engine for generating design system palettes from seed colors. Provide any number of seed colors in any common format. The engine runs them through a registered pipeline — intake, role resolution, contrast enforcement, variant derivation — and emits role-resolved palettes. Output adapters (CSS variables, Tailwind, VS Code semantic tokens, native chrome, RDF graphs) are separate plugins. The engine ships with zero runtime dependencies.
Live builder
The example panel on the right is running iridis against your seeds. Pick a color, watch every chrome and syntax token in the docs recompute. Your settings persist across pages via localStorage. Every page uses the same builder.
What it does
- Variable input. 1 to N seed colors in any format (hex, rgb, hsl, oklch, lab, named, image pixels). Intake adapters normalize to a canonical OKLCH-first record.
- Role-resolved. Roles are consumer-defined JSON Schema. The engine assigns colors to roles, expands missing roles parametrically, enforces contrast pairs, and emits role-shaped output.
- Pluggable everything. Math primitives, intake formats, transforms, and emitters are all registered domain modules. Swap
mixOklchfor a perceptual mixer, register a custom emitter, compose your own pipeline. - Contrast-enforced. WCAG 2.1, APCA, and CVD simulation as registered tasks. Pairs that fail thresholds are nudged in OKLCH space until they pass — every frame, if you want.
- Browser- and Node-safe. Core has zero runtime dependencies. Plugins own their deps. Tree-shake or run as CLI; same engine either way.
- Living color (coming). Treat a palette as a vector and animate trajectories through OKLCH × N-roles space. Chameleons and chromatophores for your UI.
Where to look next
- Getting started — install and first run
- Pipeline — task names, ordering, contracts
- Role schemas — define what a palette must satisfy
- CLI recipe — JSON config to filesystem outputs
- Living color (v2 thesis) — animation engine and reactive bindings planned next