본문으로 건너뛰기
Skillpedia
브랜딩12k · #11510

better-colors

하는 일

색상을 변환하고, 팔레트를 만들고, 대비를 확인하며, 명확한 의미로 색을 적용하도록 AI 에이전트를 안내합니다. 웹 인터페이스의 스타일을 정하는 디자이너와 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓hex, RGB, HSL, OKLCH 사이에서 색상을 변환해야 할 때.
  • ✓색상 팔레트나 다크 모드 색상을 만들고 싶을 때.
  • ✓텍스트와 배경 색의 대비가 충분한지 확인해야 할 때.

스킬 링크

https://github.com/trycompai/crm/blob/release/.agents/skills/better-colors/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/trycompai/crm/blob/release/.agents/skills/better-colors/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 앱의 밝은 색과 어두운 색 팔레트를 만들고, 텍스트 대비가 읽기 쉬운지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 프로젝트의 기존 색 체계를 유지하고, 지각적 색 공간에서 팔레트를 만들며, 수정안을 제안하기 전에 대비를 측정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

OKLCH Colors

OKLCH is a perceptually uniform color space where lightness, chroma, and hue are useful design controls. Use it when the project already uses OKLCH, when creating a new color system, or when the user asks for conversion or palette work. Otherwise preserve the project's established tokens and notation: a consistent hex or RGB token system is better than introducing a second color representation for an isolated fix. To explore interactively, visit oklch.fyi.

Quick Reference

Category When to use Reference
Conversion Hex/rgb/hsl to oklch color-conversion.md
Palettes Generate scales, multi-hue, dark mode palette-generation.md
Contrast APCA/WCAG checks, reporting failures, fixing on request accessibility-contrast.md
Gamut & Tailwind P3 fallbacks, @theme scales, gamut clamping gamut-and-tailwind.md
Usage Semantic tokens, one meaning per color, primary-action emphasis, appearance variants color-usage.md

Core Principles

1. Use a Perceptual Color Space

  • Respect the existing system. Do not convert notation merely because this skill was loaded. Reuse the project's semantic tokens and authoring format unless the task includes a color-system migration.
  • Perceptual uniformity. Equal L steps = equal brightness. oklch(0.5 ...) is visually mid. HSL's lightness: 50% varies wildly by hue.
  • Stable hue. HSL blue shifts toward purple as lightness changes. OKLCH hue stays constant across the full lightness range.
  • Independent chroma. Chroma is an absolute measure of colorfulness that doesn't depend on lightness. HSL saturation does.
  • Finite gamut. Not every oklch value maps to a displayable sRGB color. High-chroma values at certain hues will clip; gamut awareness is required.

2. Write and Format OKLCH Consistently

oklch(L C H)
oklch(L C H / alpha)
Channel Range Description
L (Lightness) 0–1 0 = black, 1 = white. Perceptually uniform.
C (Chroma) 0–~0.4 Colorfulness. 0 = gray. Max depends on L and H.
H (Hue) 0–360 Hue angle in degrees.
alpha 0–1 Optional transparency. Slash syntax.
oklch(0.637 0.237 25.331)
oklch(0.8 0.05 200 / 0.5)

Use three decimal places for L and C and up to three for H. Drop trailing zeros and format -0 as 0. OKLCH is Baseline 2023; when support requirements are unusually broad, check the target project's browser matrix instead of relying on a fixed global-coverage percentage.

3. Measure Contrast, Gamut, and Palette Behavior

Rule Value
Light/dark boundary L > 0.73 = light background → dark text; below it, light text still scores higher
Lightness gap (light bg) Foreground L < 0.35 when background L > 0.9
Lightness gap (dark bg) Foreground L > 0.9 when background L < 0.25
Hue drift threshold > 10° spread across palette steps = visible drift
APCA body text |Lc| >= 75 minimum, >= 90 preferred
APCA non-body text |Lc| >= 60 minimum
WCAG 2 normal text 4.5:1 AA, 7:1 AAA
Contrast fix (only when asked) Adjust L first; preserve C and H when possible, then remeasure the rendered pair

Common Mistakes

Issue Fix
Raw color bypasses the project's semantic token system Reuse or add the correct role token in the project's existing notation
Isolated OKLCH value introduced into a hex/RGB codebase Preserve the established notation unless the task includes a color-system migration
HSL palette ramp with hue drift Rebuild with constant oklch hue
Failing contrast (check foreground vs its background using APCA) Report the pair, its measured Lc and the threshold it misses; change colors only when asked (then adjust L, keep C and H)
High chroma without gamut check Clamp to max chroma for the L/H in sRGB
Same absolute C across different hues Use same C% (percentage of max) for consistent vividness
P3 color without sRGB fallback Add @media (color-gamut: p3) pattern
Dark mode created by mechanically reversing the light palette Use the light palette as a starting point, then tune chroma and lightness and recheck every foreground/background pair
Hex in Tailwind v4 @theme Convert to oklch values
Alpha with comma syntax Use slash: `oklch(
자주 묻는 질문

프로젝트를 OKLCH로 바꾸나요?

아닙니다. 스킬은 마이그레이션을 요청하지 않는 한 프로젝트의 기존 색 형식을 유지하라고 설명합니다.

대비는 어떻게 확인하나요?

APCA 또는 WCAG 대비 검사를 사용해 실패 항목을 보고하며, 요청했을 때만 고칩니다.

OKLCH가 무엇인가요?

명도, 채도, 색상을 쉽게 조절할 수 있는 색 공간이며, 고르게 보이는 팔레트를 만드는 데 도움이 됩니다.

상세 정보

작성자의 원본 설명

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

repo: trycompai/crm

인기도

GitHub 스타
12k
순위
#11510
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬