К основному содержанию
скилл CX Codex

color — скилл для Claude Code: что делает и как установить

Скилл color для Claude Code проверяет экранный контраст текста и элементов интерфейса, привязывает цвета к ролевым токенам и валидирует тёмную тему. Запускается при вёрстке экранов и дизайн-ревью.

MIT 178 установок ★ 69 обновлён 2026-11-14

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add raphaelsalaja/skills --skill color -a claude-code
Открыть на GitHub

Что делает color

Скилл проверяет экранный контраст по точным коэффициентам: от 4.5:1 для обычного текста и от 3:1 для крупного шрифта, границ полей ввода и смысловых иконок. Значения считываются с отрисованного экрана через скрипт contrast.js с учётом прозрачности и всех фоновых слоёв, а не угадываются по названию токена. Текст над фотографиями и видео требует обязательной градиентной подложки или сплошной плашки.

Компоненты обязуются использовать ролевые токены вроде --text-secondary вместо прямых шагов палитры вроде --gray-500. Разделители и состояния наведения оформляются полупрозрачными нейтральными цветами с альфа-каналом, чтобы не теряться на серых карточках. В тёмном режиме всплывающие слои поднимаются за счёт более светлого тона, а не теней, при этом акцентный цвет заменяется на адаптированный светлый оттенок.

Результаты аудита группируются по уровню критичности: заниженный контраст основного текста и отсутствие подложки под фото блокируют ревью со статусом HIGH.

Какие задачи решает

  • находить текст и границы элементов с контрастом ниже порогов 4.5:1 и 3:1
  • заменять прямые шаги палитры в компонентах на семантические ролевые токены
  • настраивать полупрозрачные альфа-нейтрали для состояний наведения и разделителей
  • адаптировать акцентные цвета и уровни подъёма поверхностей для тёмной темы
  • добавлять градиентные подложки под текстовые блоки над изображениями

Примеры запросов агенту

  • Проверь контрастность кнопок и полей ввода на странице оформления заказа
  • Найди компоненты с прямыми переменными палитры и замени их на ролевые токены
  • Протестируй тёмную тему и убедись, что ссылки имеют контраст выше 4.5:1

Как установить color

1Через Skills CLI (Vercel)

npx skills add raphaelsalaja/skills --skill color -a claude-code

2Вручную: положить файлы

~/.claude/skills/color/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/color/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о color

Как установить color в Claude Code?

Выполните команду npx skills add raphaelsalaja/skills --skill color -a claude-code. Также файл скилла можно сохранить вручную по пути ~/.claude/skills/color/SKILL.md.

Что делает скилл color?

Он инспектирует палитру интерфейса, замеряет фактический контраст элементов на экране и проверяет привязку стилей к семантическим ролевым переменным.

Как скилл измеряет контрастность полупрозрачных слоёв?

Скрипт contrast.js запускается прямо в браузере, рассчитывает итоговый цвет после смешивания всех слоёв с opacity и подтверждает результат на увеличенном фрагменте экрана.

Исходный текст

SKILL.md · MIT
---
name: color
description: Holds text and control contrast to exact ratios, routes colour through role tokens and gives dark mode its own palette.
---

# Color

This skill holds the colour rules that apply on every screen. It covers contrast, role tokens, translucent neutrals, dark mode and what the accent is for.

## Ratios are exact, measured on screen

The contrast ratios here are exact and apply in every theme. A ratio is read from the colour the screen draws, never guessed from a token's name. A ratio under the threshold is a finding in any style.

Searching for an existing token belongs to `reuse`. `color-scheme`, `theme-color`, the theme switch and status shown by colour alone belong to `defaults`. Whether a colour should be there at all belongs to `restraint`.

## Body text clears 4.5:1

Text under 24px, or under 18.66px when bold, meets 4.5:1 against what sits behind it. Larger text meets 3:1. Placeholders and secondary text count, and disabled controls do not. `#999` text on white, at 2.8:1, is `color-text-contrast`.

## Field edges and icons clear 3:1

The edge that shows where a field is, a toggle's track and an icon that carries meaning meet 3:1 against their surround. A field whose only edge is a `#e5e5e5` border on white, at 1.3:1, is `color-ui-contrast`. Dividers and the ring on a floating surface are decoration and exempt.

## Measure the colour on screen

Translucent colours and `opacity` composite over every layer behind them before the ratio is read. Read each theme and each surface the text appears on. A ratio taken from the token's hex while the text sits at `opacity: 0.6` is `color-measure-composited`.

Run [contrast.js](contrast.js) in the page through the browser's evaluate call. Treat each result as a candidate, and confirm it in a zoomed crop before reporting it.

## Text over images takes a scrim

Text on a photo or a video sits on a gradient scrim or a solid plate. The ratio holds at the lightest point of the image under the text. White text over a bright sky is `color-scrim-under-text`.

## Components use role tokens

Components reference tokens named for their role, such as `--text-secondary` or `--surface-raised`. Only the theme file maps a role to a palette step. `color: var(--gray-500)` inside a component is `color-role-tokens`.

## Neutrals on surfaces are translucent

Borders, dividers, hover fills and pressed fills use alpha neutrals, so they read on any surface beneath them. A solid `#f5f5f5` hover fill that vanishes on a grey card is `color-alpha-neutrals`.

## Dark mode is its own palette

Dark surfaces rise by getting lighter, because a shadow barely shows on a dark page. A dark popover the colour of the page, raised by a shadow alone, is `color-dark-raises-lighter`.

Accents and status colours take dark values tuned for contrast. The light `#2563eb` link reused on a `#0a0a0a` page, at 3.8:1, is `color-dark-tuned-accents`.

## The accent marks action

The accent colour marks the primary action, the selection and focus. An accent heading or a row of accent icons is `color-one-accent`.

Each status colour keeps one meaning. Red marks errors and destructive actions only. A red "New" badge is `color-status-meaning`.

## The pair

Every check is a pair. The broken line sits beside the line that replaces it.

| Rule | Broken | Replacement |
| --- | --- | --- |
| `color-text-contrast` | `color: #999` on white, 2.8:1 | `color: #737373`, 4.7:1 |
| `color-ui-contrast` | A field edged by `#e5e5e5` on white, 1.3:1 | `border-color: #8a8a8a`, 3.5:1 |
| `color-measure-composited` | "The token is `#171717`, so it passes" | The ratio of the drawn colour at `opacity: 0.6`, read on screen |
| `color-scrim-under-text` | White text straight over a photo | `linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent)` under the text |
| `color-role-tokens` | `color: var(--gray-500)` in `Card` | `color: var(--text-secondary)` |
| `color-alpha-neutrals` | `background: #f5f5f5` on hover | `background: var(--gray-a3)` on hover |
| `color-dark-raises-lighter` | A dark popover at the page's `#0a0a0a` | The popover at `#1a1a1a` over the `#0a0a0a` page |
| `color-dark-tuned-accents` | `#2563eb` links on `#0a0a0a`, 3.8:1 | `#60a5fa` in the dark theme, 7.8:1 |
| `color-one-accent` | Section headings in the accent colour | Headings in `--text-primary`, the accent on the primary button |
| `color-status-meaning` | A red "New" badge | A neutral or accent badge |

## Reporting

**Severity.** `HIGH` is body text under its ratio on a primary surface, a field whose edge fails 3:1 or text over an image with no scrim. `MEDIUM` is a palette step inside a component, a solid neutral that vanishes on a surface or a ratio never read on screen. It is also a dark surface raised by shadow alone or a light accent reused in dark mode. `LOW` is the accent used for decoration or a status colour carrying a second meaning.

**Format.** One finding per root cause:

```
file:line - [rule-id] what is wrong (measured ratio)
```

Then a `Rule | Count | Severity` summary. `Block` when any `HIGH` remains, `Approve` otherwise. Never `Approve` a theme you did not open. Mark text over canvas, video and cross-origin frames as `Not verified`.

© raphaelsalaja · MIT · raphaelsalaja/skills

Похожие скиллы

Все скиллы по теме «Дизайн» →
tokens-and-color Thientan Soparat Правило tokens-and-color для Claude Code подключается при создании, расширении или проверке токенов, настройке темы и выборе цвета. Оно задаёт уровни токенов и требования к контрасту. CX Codex +1 ★ 3 216звёзд репо color-contrast-auditor curiositech Скилл color-contrast-auditor находит пары цветов, которые не проходят WCAG 2.1, и предлагает исправления. Пригодится перед релизом, при аудите CSS или когда текст на скриншоте не читается. CX Codex +1 262установок color-mode-and-theme dembrandt Скилл color-mode-and-theme помогает выбрать цветовую схему проекта, решить вопрос о поддержке тёмной темы и выстроить токены без сломанного контраста. CX Codex +1 1 100установок color-theory omer-metin Скилл color-theory настраивает цветовые палитры, токены и контрастность интерфейса с учётом WCAG, тёмной темы и особенностей восприятия оттенков. CX Codex +1 123установок html-css-style-color-guide официальный github Правило html-css-style-color-guide задаёт ограничения и рекомендации для цветового оформления HTML и CSS. Помогает выбирать фоны, текстовые цвета и градиенты с учётом контраста. CX Codex +1 ★ 41 430звёзд репо better-colors jakubkrehel Скилл better-colors для Claude Code создаёт цветовые палитры и проверяет их контрастность. Он включается при работе с цветовой системой интерфейса: от генерации шкал до аудита токенов. CX Codex +1 42 600установок

Из того же набора25

Весь набор →
gather Скилл gather для Claude Code собирает дизайн-референсы из выбранных источников в одну доску со ссылками. Запускается по просьбе найти вдохновение или улучшить экран. CX Codex +1 187установок alignment Скилл alignment для Claude Code проверяет выравнивание и визуальный баланс работающей страницы. Его запускают для поиска смещений, неровных отступов и несовпадений радиусов. CX Codex +1 183установок deconstruct Скилл deconstruct для Claude Code деконструирует анимации и интерфейсные взаимодействия в машину состояний и покадровый таймлайн. CX Codex +1 182установок viewports Скилл viewports для Claude Code проверяет страницу на переполнение и проблемы с элементами интерфейса. Запускается после изменений вёрстки или по запросу проверить конкретный телефон или ширину. CX Codex +1 180установок audit Скилл audit для Claude Code, запускающий сводный аудит изменений по набору правил и формирующий интерактивный отчёт. Оценивает диффы, ветки, сессии или весь репозиторий. CX Codex +1 176установок frames Скилл frames для Claude Code записывает трассу взаимодействия при ограничении CPU и находит причину потерянных кадров или задержки ввода. После исправления он сравнивает новую запись с исходной. CX Codex +1 176установок match Скилл match для Claude Code воссоздаёт названную часть интерфейса по реальному образцу и сравнивает обе версии. Запускается, когда в запросе есть приложение, URL, скриншот или дизайн-референс. CX Codex +1 175установок reuse Скилл reuse для Claude Code задаёт строгий порядок переиспользования: сначала компоненты проекта, затем внешние библиотеки, а самописный код — в последнюю очередь. Помогает пресекать дубли при ревью UI. CX Codex +1 175установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой