@crafts69guy/hue-theme-tokens
v0.2.0
Published
Portable Huế-inspired semantic design tokens for web and application themes.
Readme
@crafts69guy/hue-theme-tokens
The core of the Hue Theme system: source design tokens plus the build that resolves and validates them into portable artifacts.
Layers
- Primitive — authored colors with cultural metadata, per mood, in
src/themes/{mua,huong,cung}.json(DTCG format). - Semantic — stable roles (
surface.canvas,status.notice,syntax.keyword, …) declared once insrc/contract.ts, with aclosed/open flag per family. - Adapters — map semantic roles onto a host API without mutating source
data (see
src/adapters/).
Build
bun run build # resolve tokens, validate against the contract, write generated/
bun run check # build --check (no writes) + tsc --noEmitbun run build validates every mood against the contract and WCAG AA contrast,
then writes generated/themes.{json,ts,css} and every adapter's output: the Yaak
plugin (packages/yaak-plugin), the Neovim/LazyVim plugin
(packages/nvim-plugin), the tmux TPM plugin (packages/tmux-plugin), the
Ghostty, bat, lazygit, and delta theme files (packages/terminal-themes), the
Fish/Tide theme files (packages/fish-themes), the herdr and tuicr fragments
(packages/herdr-plugin), and the unified Inkdrop v6 packages
(packages/hue-*-theme), plus ChatGPT/Codex share strings
(packages/codex-themes). Generated artifacts must not be edited by hand.
The root bun run ci starts with biome ci .; run bun run format from the
repo root after rebuilding generated artifacts so formatter and import-order
drift does not block CI before tests run.
Exports
.→ compiledgenerated/themes.jswiththemes.d.tsdeclarations (themeBundle,getTheme,SemanticTokenand per-family token unions such asSTATUS_TOKENS/StatusToken)../themes.css,./themes.json→ the generated CSS variables and flat data.
