Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

color

БесплатноЗапускает вложенные скриптыНе проверен

Holds text and control contrast to exact ratios, routes colour through role tokens and gives dark mode its own palette.

raphaelsalajaот raphaelsalaja★ 74 звезды на GitHub

Об этом скилле

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. They are WCAG 2 ratios, the method conformance claims and accessibility law cite. 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.

Taste values, such as off-white text, alpha neutrals and the gradient stops, yield to a palette the project already follows. The ratios never yield.

Searching for an existing token belongs to reuse. color-scheme, theme-color, the theme switch, status shown by colour alone and surfaces under reduced transparency belong to defaults. Whether a colour should be there at all belongs to restraint. A focus ring's style belongs to defaults, and its 3:1 change from the unfocused state is checked stop by stop in keyboard.

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.

Native checkboxes, radios and range inputs take the accent through accent-color, and the drawn control meets 3:1 against its surface. With color-scheme: light dark on the root, they redraw for the dark theme. A default blue checkbox beside an orange accent is color-accent-color.

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 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. Each failure carries suggestion, the nearest colour at the same hue that passes. Fix with the role token closest to it. Each text finding also carries lc, its APCA lightness contrast.

The ratio is the pass line

APCA lightness contrast (Lc) is a second read, never a pass. No standard requires it yet. White on #f97316 reads at Lc 58 but fails at 2.8:1, and calling it a pass is color-ratio-is-the-pass-line.

The ratio overstates light text on dark surfaces. #888888 on #0a0a0a passes at 5.6:1 yet reads at only Lc 38. Report Lc beside the ratio in the dark theme, and between two passing candidates take the higher absolute Lc.

The contrast-color() function stays off mid-tones

contrast-color() returns white or black, whichever has the higher ratio. On a mid-tone fill the pick can pass and still read poorly. #2277d3 gets black at 4.65:1 and Lc 33, while white reads at Lc 76.

Use it only on fills where its pick clears 7:1, a fill luminance under 0.1 or over 0.3. Give a mid-tone fill a paired token such as --on-accent. contrast-color() on a mid-blue button is color-contrast-color-mid-tones. Declare a fixed colour before it, which older browsers keep.

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.

States mix from their role token

Hover and pressed states of a coloured fill, such as --accent, derive from that token with color-mix(in oklch, …) or relative colour syntax. Every theme then carries them. Mix toward --text-primary, not black, so the dark theme lightens on hover. A hand-picked #1d4ed8 hover beside --accent: #2563eb is color-states-from-tokens. The mixed fill is measured like any other.

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 o

Полный SKILL.md на GitHub

Установить color в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yamlcontrast.js

FAQ

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

Holds text and control contrast to exact ratios, routes colour through role tokens and gives dark mode its own palette.

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

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл color запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить color с