Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jakubkrehel avatar

Oklch Skill

  • 2.5k installs
  • 212 repo stars
  • Updated July 10, 2026
  • jakubkrehel/oklch-skill

oklch-skill is an agent skill that OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut bounda.

About

OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean Most color problems in CSS broken palettes failing contrast hue drift come from using color spaces that don t match how we see OKLCH fixes the model so the tools work To explore interactively visit oklch fyi https oklch fyi Category When to use Reference Conversion Hex rgb hsl to oklch color conversion md color conversion md Palettes Generate scales multi hue dark mode palette generation md palette generation md Contrast APCA WCAG checks fixing failing contrast accessibility contrast md accessibility contrast md Gamut Tailwind P3 fallbacks theme scales gamut clamping gamut and tailwind md gamut and tailwind md 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

  • description: OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle
  • OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean. Most color problem
  • | Category | When to use | Reference |
  • Follow oklch-skill SKILL.md steps and documented constraints.
  • Follow oklch-skill SKILL.md steps and documented constraints.

Oklch Skill by the numbers

  • 2,485 all-time installs (skills.sh)
  • +123 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #337 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

oklch-skill capabilities & compatibility

Capabilities
description: oklch color space for web projects. · oklch is a perceptually uniform color space wher · | category | when to use | reference | · follow oklch skill skill.md steps and documented
Use cases
orchestration
From the docs

What oklch-skill says it does

description: OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color conversi
SKILL.md
OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean. Most color problems in CSS — broken palettes, failing contrast, hue drift — come from using color
SKILL.md
| Category | When to use | Reference |
SKILL.md
npx skills add https://github.com/jakubkrehel/oklch-skill --skill oklch-skill

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.5k
repo stars212
Security audit3 / 3 scanners passed
Last updatedJuly 10, 2026
Repositoryjakubkrehel/oklch-skill

When should an agent use oklch-skill and what problem does it solve?

OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color conversion, palette g

Who is it for?

Developers invoking oklch-skill as documented in the skill source.

Skip if: Skip when requirements fall outside oklch-skill documented scope.

When should I use this skill?

OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color conversion, palette g

What you get

Outputs aligned with the oklch-skill SKILL.md workflow and stated deliverables.

  • Contrast audit results
  • adjusted color values
  • APCA threshold guidance

Files

SKILL.mdMarkdownGitHub ↗

OKLCH Colors

OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean. Most color problems in CSS — broken palettes, failing contrast, hue drift — come from using color spaces that don't match how we see. OKLCH fixes the model so the tools work. To explore interactively, visit oklch.fyi.

Quick Reference

CategoryWhen to useReference
ConversionHex/rgb/hsl to oklchcolor-conversion.md
PalettesGenerate scales, multi-hue, dark modepalette-generation.md
ContrastAPCA/WCAG checks, fixing failing contrastaccessibility-contrast.md
Gamut & TailwindP3 fallbacks, @theme scales, gamut clampinggamut-and-tailwind.md

Why OKLCH

  • 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.

OKLCH Syntax

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

Formatting: L and C use 3 decimal places, H uses up to 3. Drop trailing zeros. Format -0 as 0. Browser support: Baseline 2023, 96%+ global coverage.

Key Thresholds

RuleValue
Light/dark boundaryL > 0.6 = light background → use dark text
Lightness gap (light bg)Foreground L < 0.45 when background L > 0.85
Lightness gap (dark bg)Foreground L > 0.75 when background L < 0.25
Hue drift threshold> 10° spread across palette steps = visible drift
APCA normal text\
WCAG 2 normal text4.5:1 AA, 7:1 AAA
Contrast fixAdjust L only — chroma has negligible effect

Review Output Format

Always present color changes as a markdown table with Before and After columns. Include every color that was changed — not just a subset. Never list findings as separate "Before:" / "After:" lines outside of a table.

BeforeAfter
color: #3b82f6color: oklch(0.623 0.188 259.815)
Same absolute C across huesSame C% of each hue's max chroma
No sRGB fallback for P3 color@media (color-gamut: p3) wrapper

This keeps feedback scannable and diff-friendly. Each row is a self-contained change the developer can act on independently.

Common Mistakes

IssueFix
Hex/rgb/hsl color in new codeConvert to oklch()
HSL palette ramp with hue driftRebuild with constant oklch hue
Failing contrast (check foreground vs its background using APCA)Adjust oklch L channel, keep C and H
High chroma without gamut checkClamp to max chroma for the L/H in sRGB
Same absolute C across different huesUse same C% (percentage of max) for consistent vividness
P3 color without sRGB fallbackAdd @media (color-gamut: p3) pattern
Dark mode with hand-picked colorsDerive from light palette by reversing L mapping
Hex in Tailwind v4 @themeConvert to oklch values
Alpha with comma syntaxUse slash: oklch(L C H / alpha)

Reference Files

  • color-conversion.md — Supported formats, conversion examples, bulk conversion rules, what to leave alone
  • palette-generation.md — Scale convention, generation algorithm, multi-hue palettes, dark mode, why not HSL
  • accessibility-contrast.md — APCA and WCAG 2 thresholds, fixing contrast with L, lightness gap guide, hue drift detection
  • gamut-and-tailwind.md — sRGB vs P3, gamut clamping, CSS fallback patterns, Tailwind v4 @theme and migration

Related skills

How it compares

Pick oklch-skill when adjusting perceptual oklch palettes with APCA rather than legacy ratio-only WCAG 2 checks.

FAQ

What is oklch-skill?

OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color c

When should I use oklch-skill?

OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color c

Is oklch-skill safe to install?

Review the Security Audits panel on this page before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.