opyeb ColorOKLCH

About

OPYEB · ColorOKLCH · basis 28 November 2026

What it does

ColorOKLCH builds a palette along the lightness axis with hue (H) and chroma (C) held fixed. Move the L, C and H sliders and eleven steps (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950) are recomputed at once, each with its oklch() value, sRGB hex and gamut badge. The contrast matrix tab calculates WCAG 2.1 ratios and APCA Lc for 121 foreground and background pairs, marks AA and AAA, and proposes a lightness correction for pairs that fail. The export tab writes light-dark() tokens, CSS custom properties and a Tailwind v4 @theme block, with the light and dark previews side by side.

What it is based on

Colour conversion follows the oklch() and color() definitions in CSS Color 4 and Björn Ottosson's OKLab matrices. Contrast is implemented twice: the WCAG 2.1 relative-luminance formula and the APCA (SAPC 0.0.98G-4g) Lc calculation. Gamut status is checked against the linear sRGB and Display-P3 boundaries, and when a colour is outside them the chroma is reduced by binary search to produce the hex fallback. The basis date is on every page and each guide cites the specification it uses.

What it does not do

It does not extract palettes from images, accept uploads or store colours on a server. Design-system approval workflows, accessibility certification and print CMYK conversion are out of scope. APCA is a candidate method for the WCAG 3 draft, so do not use it alone as a legal conformance test; read it with the WCAG 2.1 figures.

Operator

Built and run by OPYEB. Bug reports, specification changes and privacy requests go through the single OPYEB contact form. Advertising is served by Google AdSense and keeps the tool free.

Back to the palette