ui-color
暂无简介
- License 许可
- MIT
- 所属仓库
- bonc-ai/cogseed
- 最近更新
- 2026-11-13
- Stars
- ★ 19
- Forks
- 10
01 前言 Front Matter
- name
- ui-color
- category
- rnd
- ownerAgent
- bcfcb4921dce
- description_en
- Build and review UI color systems across OKLCH/OKLAB, palettes, semantic color, contrast, chart color, dark mode, and accessible color rules.
- description_zh
- 构建和审查 UI 配色,覆盖 OKLCH/OKLAB、调色板、语义色、对比度、图表色、暗色模式和可访问性色彩规则。
02 资源文件 7
- 参考文档artifact.yaml736 B
- 参考文档evals/evals.json245 B
- 参考文档references/business-ontology.yaml63 B
- 参考文档references/security-manifest.yaml2.3 KB
- 参考文档references/skill-spec.yaml316 B
- 参考文档references/validation-contract.yaml49 B
- 参考文档schemas.json40 B
03 SKILL.md 正文
ui-color
Use this skill when creating or reviewing palettes, contrast, semantic color, dark mode, or chart colors. It adapts Color Expert-style color reasoning into practical UI work.
Color Roles First
Start with roles before choosing hues:
bg: page background.surface: panels, rows, cards, inputs.surface-raised: dialogs, menus, popovers.text: primary content.text-muted: metadata and helper text.border: dividers, input outlines, table rules.accent: primary action, selection, active state.focus: visible keyboard focus.danger,warning,success,info: semantic states.chart-*: data series, separate from action colors.
Do not use the same accent for primary action, warning, and chart series.
OKLCH And Perceptual Rules
When authoring new palettes:
- Prefer OKLCH/OKLAB reasoning for even lightness and chroma steps.
- Keep neutral surfaces low-chroma.
- Use accent chroma deliberately; high chroma should be rare in work tools.
- Build light and dark variants by role, not by automatic inversion.
- Keep semantic colors distinct in hue and lightness.
When the codebase uses hex, HSL, RGB, or CSS variables, implement in the local format while preserving the role logic.
Contrast Rules
Check contrast for:
- Body text on page and panel backgrounds.
- Muted text on surfaces.
- Buttons in default, hover, pressed, and disabled states.
- Inputs, focus rings, and validation messages.
- Table row selection and hover.
- Status chips and alerts.
- Chart labels and legends.
Do not rely on color alone for state. Pair semantic colors with text, icon shape, position, or pattern.
Palette Construction
For product UI:
- Use 1 primary accent.
- Add at most 1 secondary accent unless data visualization requires more.
- Keep neutral scale broad enough for hierarchy.
- Keep borders visible but quiet.
- Reserve saturated colors for action, selection, and status.
For dashboards:
- Separate categorical chart colors from UI actions.
- Avoid too many similar blues or purples.
- Make critical alerts readable in both color and text.
For brand/editorial pages:
- Color may be more expressive, but the product/place/object must stay inspectable.
Dark Mode
Dark mode is not inverted light mode:
- Raise surfaces through lightness differences, not heavy shadows.
- Keep text contrast high without pure white everywhere.
- Lower accent chroma if it blooms.
- Re-check semantic colors; red and yellow often need separate dark-mode values.
Review Output
When reporting color decisions:
- List role tokens.
- Explain accent and semantic usage.
- Note contrast risks.
- Note one-hue or over-saturation risks.
- State whether chart/data colors are separate from action colors.
04 同仓库更多 Skills
sample-supply-chain
供应链样本:安装钩子 + 拼写伪装 + 源覆盖。
sample-prose-only
纯散文安全守则样本:禁止某行为的说明不等于该行为。
sample-obfuscated
混淆载荷样本:解码与执行共现。
sample-hidden-content
隐藏内容载荷样本:用于回归「不可见字符不做上下文降权」这一不变量。
sample-evasion
反规避样本:危险内容只以「不可见字符切断」与「编码后」两种形式出现。
sample-agentic
代理运行时风险样本:配置篡改 + 隐蔽指令。