会员账号

← 全部 Skills

配色设计 · /xxd-ui-token

xxd-ui-token

把中国传统色转换为可交付的 CSS、Tailwind、Figma 及明暗模式语义设计令牌。

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.
  1. Build light mode around readability and white or pale canvas unless the product needs strong editorial contrast.
  2. Build dark mode as its own mapping using project colors; do not invert.
  3. Define state behavior for hover, active, selected, disabled, focus, success, warning, danger, and info only when needed.
  4. 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.

正在加载 Skills…

找回密码

输入注册邮箱,我们会发送一封重置邮件。

确认删除

删除后将从网站中移除。

API 迁移

导入 API 配置