Open Source · Apache-2.0
✦ AI Skills · active
No more hardcoded colors, manual dark mode, or per-brand forks. One config file, all variants — multi-theme, dark mode by design, whitelabel-ready.
No-LLM pipeline — zero cost at build time
Token generation is 100% deterministic and script-based. Zero AI tokens consumed.
AI Skills for Cursor, Claude Code and Copilot
One command injects integration skills into the workspace — agents use correct tokens by component type without guessing or hardcoding.
Six recurring pains when shipping multi-theme, whitelabel or dark mode — and how Aplica DS solves them with a single config.
#2563EB repeated across 50+ files. Changing the brand color becomes a manual find-and-replace across the entire codebase.
Every new color needs a manual dark variant. Tokens double, bugs too.
CSS, React Native and Figma live in separate worlds. Divergence is a matter of time.
blue-500 is a color, not a role. Without a decision layer, engineers guess — and get it wrong.
Whitelabel without architecture becomes a fork. Each new brand multiplies maintenance cost.
Switching from Radix to Base UI, or using a proprietary DS, means rebuilding tokens from scratch. Aplica DS is agnostic: the semantic layer connects to any library via integration Skills.
WHY APLICA DS
Style Dictionary handles multi-platform output. CSS variables handle local customization. What both lack is the semantic layer that gives tokens intent.
| Manual CSS vars | Style Dictionary | Aplica DS | |
|---|---|---|---|
| 5-layer semantic structure | — | — | ✓ |
| Dark mode by construction (OKLCh) | — | — | ✓ |
| Multi-brand from one config | — | — | ✓ |
| Multi-platform output (CSS, JSON, TS…) | — | ✓ | ✓ |
| Deterministic pipeline (same config → same output) | — | partial | ✓ |
| Built-in algorithmic accessibility | — | — | ✓ |
5-layer semantic structure
Dark mode by construction (OKLCh)
Multi-brand from one config
Multi-platform output (CSS, JSON, TS…)
Deterministic pipeline (same config → same output)
Built-in algorithmic accessibility
Each layer has a single responsibility. Swapping a brand doesn't affect semantics. Swapping a mode doesn't affect structure.
SEMANTICS + AI
A semantic token doesn't store a color. It stores a meaning. That changes what tools, engineers, and AI agents can do with it.
An agent reading action.bg.danger.default understands its purpose without extra prompting. Semantics is machine-readable documentation, native to the token.
The semantic contract is fixed. Values shift per brand, mode, or surface. Adding a new brand means configuring — not refactoring. The system grows without technical debt.
Designer, dev, and LLM read the same token and reach the same conclusion. Semantics removes the translation layer between disciplines — and between product cycles.
aplica-theme-engine ai:init injects integration skills into the workspace. Agents understand layers, states, txtOn, txt, and component archetypes — no hardcoding, no guessing variable names.
txt tokenThe color contract expanded from 3 to 4 parts: background / txtOn / border / txt. The txt token is the readable text color on canvas — distinct from txtOn, which is text on the element's own colored background. Flat aliases at foundation.txt.*.
jsonTypedNew output format with structured metadata per token: type, value, description, and path — all key names configurable. Ideal for tooling, code generators, and AI agents that need context beyond the raw value.
See it in practice — the same token resolving differently across each brand:
Switch brand, mode and surface. Foundation tokens resolve in real time through the Semantic layer.
HOW IT WORKS
One config file. One deterministic pipeline. Consistent, accessible tokens ready for any platform.
Ensures all data folders and files exist. Fails fast if anything is missing.
Generates the spacing scale in 3 variants: minor (8px), normal (16px), major (24px). Geometric progression, 10 steps each.
Decomposes each brand color into 19 lightness levels in the perceptual OKLCh color space. Dark mode derived mathematically: dark[N] = light[20-N].
Maps palette → Mode → Surface → Semantic. Produces 4 theme variants: light-positive, light-negative, dark-positive, dark-negative.
Generates short aliases for product teams: foundation.bg.primary, foundation.txt.title, foundation.spacing.medium — all pointing to the Semantic layer.
Style Dictionary compiles the generated tokens into CSS Custom Properties, JSON, ESM, CJS, and TypeScript declarations — ready for web, mobile, and Figma.
The result in code
FOR WHOM
Each track has 6 progressive tutorials. From the designer working in Figma to the engineer integrating tokens in Radix, Base UI or any proprietary DS.
Uses the system in Figma. Learns token vocabulary, built-in accessibility and automatic dark mode via Tokens Studio.
Configures and governs the Theme Engine. Creates themes, manages product colors and defines responsible overrides. Understands the semantic architecture to deliver whitelabel.
Implements conformant components. Integrates tokens in React, Vue, React Native, Flutter or any component library (Radix, Base UI, proprietary). Adds brands to the engine via a single config file.
Apache-2.0 license. No vendor lock-in. Contributions via PR. The git history is the documentation.
The GitHub repository contains a sample project with generated tokens — to inspect engine output. To use and configure the engine, install the npm package.
Each track has 6 progressive tutorials. Choose by your profile.
Configure the engine, create themes, and deliver whitelabel. 6 tutorials, ~4h.
Start N2 →Integrate tokens in React, Vue, Flutter. Install via npm and start in minutes.
Install via npm →