Skip to content
Agents tracked: 504 Releases (7d): 733 Agent status: 2 with issuesSince last limit reset: Claude 12d · Codex 10d For AI agents: Markdown Updated Nov 23, 2026

OKLCH Skill: modern CSS colours, palettes and contrast

jakubkrehel/oklch-skill

A colour guide for your AI assistant. It moves the colours in your site's styles to OKLCH, a newer way of writing colours where the numbers match what the eye sees. It also builds colour scales, fixes text that is hard to read and sets up themes for Tailwind CSS.

Pack description by its author: “A colour guide for your AI assistant. It moves the colours in your site's styles to OKLCH, a newer way of writing colours where the numbers match what the eye sees. It also builds colour scales, fixes text that is hard to read and sets up themes for Tailwind CSS.”

Design and frontendKnowledge and rules for your assistant

GitHub

Checked against the pack's files at commit 0e81f04, on Nov 21, 2026. Tap a verdict to see its source.How we checkedReport an error

Knowledge and rules for your assistantNothing to run: text files only

Good for you if

  • You want your site's hex, rgb or hsl colours converted to OKLCH
  • You need a colour scale from 50 to 950 for a design system or a dark mode
  • Some text on your site is hard to read and you want the contrast fixed
  • You build with Tailwind CSS v4 and want your own colours in its theme

Probably not for you if

  • You want the exact numbers computed by a tool: the guide asks the assistant to check them with a real contrast calculation

What its answer looks like

The skill's own Before / After review table

| `color: #3b82f6` | `color: oklch(0.623 0.188 259.815)` |

The skill's own example, from skills/oklch-skill/SKILL.md. More examples

What you'll notice

  • Colour changes shown as a Before / After table, with every changed colour listed
  • New colours written as oklch(L C H) instead of hex
  • Contrast fixed by changing only the lightness of the text, keeping its hue
  • A plain fallback colour for older screens and browsers when a very vivid colour is used

What you need

  • Agents that read skills (installed with the skills.sh tool)
  • Free, MIT license
  • One command with the skills.sh tool
Words on this page
Skill
A set of written instructions your AI assistant follows. Installing one is like giving it a playbook.
Repositoryjakubkrehel/oklch-skill · website
GitHub stars288
Skills1
CategoryDesign and frontend
LicenseMIT
Last updatedOct 7, 2026 · card checked Nov 21, 2026 at commit 0e81f04
Install countsjakubkrehel/oklch-skill on skills.sh, Vercel's skills directory, which shows installs and security audits per skill

jakubkrehel/oklch-skill popularity over time

Most starred skill packs

jakubkrehel/oklch-skill: GitHub starstotal over time 288
jakubkrehel/oklch-skill: new stars per weekGitHub 5

What OKLCH Skill does

  • Converts hex, rgb and hsl colours to oklch(), changing only the colour values and leaving the rest of the CSS as it was
  • Builds 5, 9 or 11 step palettes (50 to 950) by spreading lightness evenly and keeping each step within what screens can show
  • Builds several hues with the same lightness and the same share of maximum vividness, so they look equally bright
  • Makes dark mode by reversing the palette: the lightest step becomes the darkest
  • Checks contrast with APCA by default and WCAG 2 for formal compliance, and fixes it by moving lightness only
  • Spots hue drift in old HSL palettes: more than 10 degrees of spread between steps
  • Clamps colours that are too vivid for ordinary screens and adds Display P3 and older-browser fallbacks
  • Writes Tailwind CSS v4 @theme colour scales in oklch

Never cut, per the skill: CSS keywords (currentColor, inherit, initial, unset, transparent), gradient interpolation methods and colours in third-party library configs that expect hex.

From the pack's SKILL.md files, summarised by AgentGid.

The skill, explained

oklch-skill

Rewrites, builds and checks the colours in your site's styles

You give

  • Your stylesheet, Tailwind theme or a base colour
  • Palette size you want: 5, 9 or 11 steps
  • The text colour and the background it sits on, for a contrast check

You get

  • A Before / After table of every changed colour
  • Colours as oklch(L C H) values
  • A palette as CSS variables --color-50 to --color-950, or a Tailwind @theme scale
  • Fallback CSS for Display P3 screens and for browsers without oklch
Say: “Convert all colours in styles.css to OKLCH and build a 9-step palette from my brand blue”

Its rules, in pictures

Sample brand scale from the skill's Tailwind @theme example (hue 250, steps 50 to 950)

oklch(0.971 0.012 250)
oklch(0.932 0.028 250)
oklch(0.882 0.048 250)
oklch(0.812 0.078 250)
oklch(0.722 0.148 250)
oklch(0.623 0.188 250)
oklch(0.535 0.168 250)
oklch(0.445 0.138 250)
oklch(0.362 0.108 250)
oklch(0.289 0.078 250)
oklch(0.215 0.048 250)

Each visual acts out what it does

In your designThe story it plays
Same lightness, same 80% of maximum vividnessBlue oklch(0.623 0.141 250), green oklch(0.623 0.157 145) and red oklch(0.623 0.202 25) look equally bright
Contrast fixText oklch(0.65 0.2 250) on oklch(0.75 0.05 250) fails; darkening only the text to oklch(0.35 0.2 250) fixes it

Drawn by AgentGid from the values in the skill's files. This is not output of the skill; sample text is ours.

See it in action

The skill defines what its answer looks like. Its own example:

| `color: #3b82f6` | `color: oklch(0.623 0.188 259.815)` |

From skills/oklch-skill/SKILL.md.

When to reach for it

You wantUse
Convert old coloursAsk to convert a file or theme to oklch
A colour scaleAsk for a 5, 9 or 11 step palette from one base colour
Readable textAsk to check and fix the contrast of a text colour on its background
Vivid colours on new screensAsk for Display P3 colours with an sRGB fallback
Try it. Say "Convert the colours in my CSS to OKLCH and check the contrast of my body text". It works if the reply is a Before / After table and the new values look like oklch(0.623 0.188 259.815).

Skills in jakubkrehel/oklch-skill

SkillIn plain wordsChanges files?What it does (author)
oklch-skill Rewrites, builds and checks the colours in your site's stylesYes 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 generation, contrast ratio, gamut, display p3, design tokens, hue drift, chroma, dark mode colors.
npx skills add jakubkrehel/oklch-skill --skill oklch-skill

The author's descriptions come from each skill's SKILL.md; the plain-words column is AgentGid's.

Good to know before you install

  • It switches on by itself when you mention colour words such as palette, contrast ratio, design tokens or dark mode colors.
  • It treats hex, rgb and hsl colours in new code as a mistake and converts them to oklch().
  • Only markdown: no scripts ship with it, so the assistant works out the colour numbers itself. The guide says its contrast rules are approximations.
  • It uses APCA contrast by default; WCAG 2 is still needed when you must claim formal WCAG conformance.
  • The author's interactive OKLCH tool is at oklch.fyi.

Before you start

Works in

  • Agents supported by the skills.sh installer: skills folder

You will need

  • Node.js (for npx): The documented install runs the skills tool through npx

Mistakes to avoid

  • Fix failing contrast by making the text colour less or more vivid
    Change only the lightness (L) of the text, keep chroma and hue
    The skill says chroma has almost no effect on contrast
  • Trust the assistant's contrast numbers as final
    Check the final pair with a real contrast calculator or a library such as Color.js
    The pack ships no code; its lightness gaps are approximations
  • Use the same absolute chroma for every hue in a multi-hue palette
    Use the same percentage of each hue's maximum chroma
    Hues have different maximum chroma at the same lightness, so equal C looks unequally vivid
  • Convert hex colours inside third-party library configs too
    Leave colours that a library expects as hex alone
    The skill lists them under what to leave alone
  • Ship a high-chroma P3 colour with no fallback
    Put an sRGB value first and the P3 value inside @media (color-gamut: p3)
    Not every P3 colour exists in sRGB, so it clips on ordinary screens

Which one to pick

If you needPick
You need colour work in OKLCH: conversion, palettes, contrast, gamut fallbacks, Tailwind v4 themesThis pack
You want a full design review of UI code with WCAG accessibility checks, not just coloursrams-design/rams-plugin
You want overall art direction and taste for the interface, beyond colour valuesLeonxlnx/taste-skill

Works well with

  • colorjs-io: Computes OKLCH conversions, P3 gamut and contrast exactly, which the skill asks to verify with a real calculation
  • tailwind-css-colors: Tailwind's default palette is in OKLCH; the skill writes custom @theme scales in the same convention
  • axe-core: Automated WCAG checks on the rendered page after colours change

May I use it like this?

UseAnswerCondition
In a commercial app YesMIT
Work for clients YesMIT
Passing the files on With conditionsMIT: keep the copyright and permission notice in copies of the skill files

Install OKLCH Skill

Official commands from the repository

npx skills add jakubkrehel/oklch-skill

The skills tool copies the skills/oklch-skill folder (SKILL.md plus four reference files) into your agent's skills folder.

Remove: delete the oklch-skill folder from your agent's skills folder

Or with the open-source skills CLI: npx skills add jakubkrehel/oklch-skill. Skills are instructions your agent follows: read them before installing.

What it installs and runs on your machine

Read in the code at commit 0e81f04, Nov 21, 2026

WhenWhat happens
InstallFive markdown files: SKILL.md and four reference files. No hooks, no scripts.
At workTells the assistant to edit colour values in your CSS and Tailwind theme files.

Quick answers

Can I use it for paid client sites?
Yes. The pack is under the MIT license; keep the license notice if you share the files.
Will it change gradients or keywords like currentColor?
No. It converts only the colour stops inside gradients and leaves CSS keywords as they are.
Do old browsers break?
The guide gives a hex fallback inside an @supports block for browsers without oklch, and notes oklch is Baseline 2023.
How many steps does a palette have?
Nine by default, matching Tailwind; five or eleven on request.
Does it need an account or a key?
No. It is a set of markdown files with no scripts and no network calls.

Checked by AgentGid on Nov 21, 2026 against commit 0e81f04 of the pack's own files. agent.md for AI agents · Report a mistake

More design and frontend skill packs

All design and frontend skills

# Install
1
nextlevelbuilder/ui-ux-pro-max-skill CheckedRuns scripts

Gets a local design library: UI styles, colour palettes, font pairings and UX rules for many product types. Before it builds a page, it looks up a matching style, colours and fonts and follows a checklist. Extra skills make logos, banners, slides and brand files; logos, mockups and icons need your own key for an outside image service.

153K +13.9K 7
2
Leonxlnx/taste-skill CheckedRuns scripts

Stops building the average landing page. It picks one of 20 researched design directions, finds real, credited pictures in open archives, then checks the page in a real browser and fixes what looks wrong. Dashboards and app screens get their own set of rules.

120K +18.7K 1
3
tt-a1i/archify CheckedRuns scripts

Turns a description, a Mermaid sketch or your project's code into an interactive diagram saved as one HTML file. It can also answer a question as a one-page explainer, with the conclusion first. The pack's own tools check every file before handing it to you.

98.7K +12.7K 5
4
cathrynlavery/diagram-design CheckedRuns scripts

Draws clean, editorial diagrams in your brand colours and fonts. You describe the diagram in plain words and get one HTML file you open with a double click. It can also redraw old draw.io, Mermaid or Excalidraw diagrams and export them as SVG or PNG.

70K +11.4K 1
5
Nutlope/hallmark CheckedRuns scripts

Builds web pages that look designed, not machine-made. It asks once for your real material and picks one of fifty visual themes. Then it builds the page and checks it against common AI design habits. Name it and it will also redesign or review a page you already have.

59.2K +25.2K 1
6

One large design playbook for your AI assistant, written in Chinese. It makes clickable app prototypes, web pages, slide decks, infographics and short animated videos as HTML, then exports them to PDF, PowerPoint, MP4 or GIF. Before any new design it shows you three real drafts to choose from and stops until you pick one.

30.3K +4,613 1