xxd-ui-token

GitHub

将中国传统色彩转化为设计师与开发者可用的UI设计Token。支持CSS、Tailwind、Figma格式,涵盖语义角色、组件状态及明暗模式映射,解决硬编码与无障碍问题。

skills/xxd-ui-token/SKILL.md nevertoday/zhongguo-traditional-colors

Trigger Scenarios

需要将中国传统颜色转换为CSS变量或Tailwind主题色 生成Figma设计变量或明暗模式配色方案 基于传统色彩构建语义化UI Token系统

Install

npx skills add nevertoday/zhongguo-traditional-colors --skill xxd-ui-token -g -y
More Options

Use without installing

npx skills use nevertoday/zhongguo-traditional-colors@xxd-ui-token

指定 Agent (Claude Code)

npx skills add nevertoday/zhongguo-traditional-colors --skill xxd-ui-token -a claude-code -g -y

安装 repo 全部 skill

npx skills add nevertoday/zhongguo-traditional-colors --all -g -y

预览 repo 内 skill

npx skills add nevertoday/zhongguo-traditional-colors --list

SKILL.md

Frontmatter
{
    "name": "xxd-ui-token",
    "description": "Convert Chinese traditional colors into practical UI design tokens. Use when a user asks for CSS variables, Tailwind theme colors, Figma variables, light and dark modes, semantic color roles, component states, or designer developer handoff based on Chinese traditional colors."
}

xxd-ui-token

Purpose

Use this skill when traditional colors need to enter a product interface or design system. The output must be usable by both designers and developers, not just look poetic.

Pain Points This Solves

  • Teams hand off HEX values without semantic roles, so developers hardcode colors inconsistently.
  • Primitive colors and component states get mixed together, making dark mode and future redesigns brittle.
  • Chinese traditional colors often need accessible, restrained UI mapping instead of decorative naming.

Data Contract

  • Use the bundled references inside this skill:
    • references/chinese-color-master-list.md: full 742-color Markdown source list.
    • references/chinese-color-harmony.csv: complete machine-readable harmony table for all 742 colors.
    • references/chinese-color-harmony.md: Markdown version of the same harmony relationships.
  • Do not synthesize tints or alpha variants as standalone source colors unless the user explicitly asks for derived states.
  • When contrast is uncertain, calculate it or route to xxd-accessible-color before claiming safety.
  • Keep traditional color names as metadata; token names should be semantic.

Token Architecture

Create tokens in layers:

  • Primitive reference: color.ref.ruban, color.ref.yuebai, or similar project-color aliases.
  • Semantic role: color.bg.canvas, color.text.primary, color.action.primary.
  • Component role: button.primary.bg, input.border.focus, tag.selected.bg only when requested.
  • Mode mapping: light and dark values point to project colors, not inverted values.

Workflow

  1. Identify interface context: content site, SaaS, dashboard, tool, mobile app, marketing page, or documentation.
  2. Decide token scope:
    • Starter theme: core background, text, action, border, focus.
    • Product theme: states, alerts, selection, charts, overlays.
    • Migration: map existing CSS/Figma colors to semantic tokens first.
  3. Build light mode around readability and white or pale canvas unless the product needs strong editorial contrast.
  4. Build dark mode as its own mapping using project colors; do not invert.
  5. Define state behavior for hover, active, selected, disabled, focus, success, warning, danger, and info only when needed.
  6. Output in the requested format:
    • CSS variables by default.
    • Tailwind config when Tailwind is named.
    • Figma variables or token JSON when Figma/design tokens are named.

Output Shape

  • Token table: token, light value, dark value, Chinese color name, source role.
  • Code block in the requested format.
  • Component map: button, link, surface, input, selection, focus, alerts.
  • Handoff notes: which tokens are stable, which are optional, and which pairs need contrast verification.
  • Migration notes when the user provides existing colors.

Avoid names like ancient-red as final tokens unless they are only primitive references with semantic aliases above them.

Version History

  • 359431b Current 2026-07-05 18:22

Same Skill Collection

skills/xxd-accessible-color/SKILL.md
skills/xxd-brand-system/SKILL.md
skills/xxd-color-brief/SKILL.md
skills/xxd-content-series/SKILL.md
skills/xxd-data-viz/SKILL.md
skills/xxd-existing-design-audit/SKILL.md
skills/xxd-palette-applier/SKILL.md
skills/xxd-palette-builder/SKILL.md
skills/xxd-print-packaging/SKILL.md

Metadata

Files
0
Version
e04c475
Hash
6dc2483a
Indexed
2026-07-05 18:22

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 17:45
浙ICP备14020137号-1 $Carte des visiteurs$