color-oklch
できること
このスキルは、人が明るさを知覚する仕方に合った、oklchの色空間で色を定義する方法を説明します。デザインシステムやアクセシブルなパレットを作るデザイナーや開発者向けです。
使う場面
- ✓明るい色と暗い色のブランドカラーのセットを作っているとき。
- ✓ホバーや押したときの状態が、色によって不均等に見えるとき。
- ✓同じ知覚的な明るさを保つダークモードのパレットが欲しいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/color-oklch/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のデザインシステム用に、oklchで青のカラーパレットを作り、10段階の色を均等な間隔にしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは色のトークンをoklchに変換し、各段階で明度の値を色相をまたいで一定に保ち、対応している画面には広い色域の色を提供できます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use oklch() and oklab() for perceptually uniform colour palettes
HSL and hex colours are defined in the sRGB colour space, which is not perceptually uniform — a 10 % lightness change looks dramatically different depending on the hue. This makes creating accessible, harmonious palettes by hand extremely difficult. oklch corrects this: adjusting the L channel produces the same perceived brightness change regardless of hue or chroma, making it far easier to build accessible colour ramps, dark-mode palettes, and consistent hover/active states.
Quick Reference
- oklch(L C H) — Lightness, Chroma, Hue — is the most practical perceptually uniform colour space for design systems
- Equal lightness steps in oklch look equal to the human eye; equal steps in hsl do not
- Define your colour palette tokens in oklch custom properties
- Use @media (color-gamut: p3) to serve wide-gamut colours to capable displays
Check
Check whether the CSS colour tokens use oklch() or a perceptually uniform colour space, or whether they use hsl/hex which may produce inconsistent perceived lightness across hues.
Fix
Convert the colour token palette from hsl/hex to oklch, ensuring the lightness (L) axis is consistent across all hues in the same shade step.
Explain
Explain what perceptual uniformity means in colour spaces, why oklch is better than hsl for design systems, and how the L, C, H channels map to human colour perception.
Code Review
Review CSS custom properties for colour tokens. Flag palette definitions in hsl or hex that use hardcoded values without a systematic lightness ramp, especially if they are intended to be interchangeable shade steps.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/color-oklch
よくある質問
hslでは、なぜ不十分ですか?
hslは知覚的に均一ではないため、明度を10パーセント変えても、色相によってまったく違って見えることがあると、このスキルは説明しています。
L、C、Hは何を意味しますか?
明度、彩度、色相で、oklchの色の三つの要素です。
一部の画面に、より広い色を提供できますか?
はい。対応しているディスプレイに広い色域の色を提供するため、色域のメディアクエリを使うと、このスキルは述べています。
詳細
作者による元の説明
Use when building a design token system, creating accessible colour palettes, generating colour ramps programmatically, or migrating a design system to support wide-gamut displays.
人気
- GitHubのスター
- 75k
- ランキング
- #2776
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
canvas
394k接続されたMacのパネルにホスト型のビジュアルウィジェットを表示し、そのパネルを隠したり別のページに移動したりするようエージェントを支援します。
control-ui
394kセッション、ダッシュボード、接続されたGatewayを含め、OpenClaw Control UIを整理し、問題を解決するようエージェントを支援します。
diagram-maker
394kプロセス、システムのアーキテクチャ、ホワイトボードのスケッチのために、SVG、HTML、または編集可能なExcalidrawとして、分かりやすい図を作るようエージェントを支援します。