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.
1---2name: ui-color3description: ui-color4---56# ui-color78Use 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.910## Color Roles First1112Start with roles before choosing hues:1314- `bg`: page background.15- `surface`: panels, rows, cards, inputs.16- `surface-raised`: dialogs, menus, popovers.17- `text`: primary content.18- `text-muted`: metadata and helper text.19- `border`: dividers, input outlines, table rules.20- `accent`: primary action, selection, active state.21- `focus`: visible keyboard focus.22- `danger`, `warning`, `success`, `info`: semantic states.23- `chart-*`: data series, separate from action colors.2425Do not use the same accent for primary action, warning, and chart series.2627## OKLCH And Perceptual Rules2829When authoring new palettes:3031- Prefer OKLCH/OKLAB reasoning for even lightness and chroma steps.32- Keep neutral surfaces low-chroma.33- Use accent chroma deliberately; high chroma should be rare in work tools.34- Build light and dark variants by role, not by automatic inversion.35- Keep semantic colors distinct in hue and lightness.3637When the codebase uses hex, HSL, RGB, or CSS variables, implement in the local format while preserving the role logic.3839## Contrast Rules4041Check contrast for:4243- Body text on page and panel backgrounds.44- Muted text on surfaces.45- Buttons in default, hover, pressed, and disabled states.46- Inputs, focus rings, and validation messages.47- Table row selection and hover.48- Status chips and alerts.49- Chart labels and legends.5051Do not rely on color alone for state. Pair semantic colors with text, icon shape, position, or pattern.5253## Palette Construction5455For product UI:5657- Use 1 primary accent.58- Add at most 1 secondary accent unless data visualization requires more.59- Keep neutral scale broad enough for hierarchy.60- Keep borders visible but quiet.61- Reserve saturated colors for action, selection, and status.6263For dashboards:6465- Separate categorical chart colors from UI actions.66- Avoid too many similar blues or purples.67- Make critical alerts readable in both color and text.6869For brand/editorial pages:7071- Color may be more expressive, but the product/place/object must stay inspectable.7273## Dark Mode7475Dark mode is not inverted light mode:7677- Raise surfaces through lightness differences, not heavy shadows.78- Keep text contrast high without pure white everywhere.79- Lower accent chroma if it blooms.80- Re-check semantic colors; red and yellow often need separate dark-mode values.8182## Review Output8384When reporting color decisions:8586- List role tokens.87- Explain accent and semantic usage.88- Note contrast risks.89- Note one-hue or over-saturation risks.90- State whether chart/data colors are separate from action colors.