{ OKLCH Color Picker }

// modern perceptual color space for css

Pick colors in the modern OKLCH color space. Export to HEX, RGB, HSL, and CSS oklch() format. Perceptually uniform color editing for web design.

#a78bfa
oklch(72% 0.20 293)
sRGB
GENERATE HARMONIES
// COLOR VALUES
CSS oklch()
oklch(72% 0.20 293)
HEX
#a78bfa
RGB
rgb(167, 139, 250)
HSL
hsl(258, 92%, 76%)
CSS Variable
--color: oklch(72% 0.20 293);
Tailwind Arbitrary
bg-[oklch(72%_0.20_293)]
// CONTRAST RATIO
Aa Aa
vs White
4.5:1
AA
vs Black
4.5:1
AA
// LIGHTNESS SCALE

HOW TO USE

  1. 01
    Pick a color

    Drag the L, C, H sliders or type any HEX/RGB/HSL value into the input field

  2. 02
    Copy your format

    Click ⎘ next to any output β€” oklch(), HEX, RGB, HSL, CSS var, or Tailwind class

  3. 03
    Generate harmonies

    Hit Complementary, Triadic, Analogous, or Split-Comp for a ready palette

FEATURES

OKLCH Sliders Gamut Detection Contrast Checker Harmony Generator Lightness Scale Tailwind Export

USE CASES

  • 🎨 Define brand color tokens in oklch()
  • πŸ”§ Check WCAG contrast compliance
  • πŸ’‘ Generate accessible color palettes
  • ⚑ Export to Tailwind v4 arbitrary values

WHAT IS OKLCH?

OKLCH is a perceptually uniform color space β€” meaning equal numeric steps look equally different to the human eye. Unlike HSL, changing hue in OKLCH preserves perceived brightness. It's the future of CSS color design.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is the OKLCH color space?

OKLCH stands for OK Lightness, Chroma, Hue β€” a perceptually uniform color model developed by BjΓΆrn Ottosson. Unlike HSL, equal steps in OKLCH produce visually equal differences, making it ideal for design systems and accessible color scales.

Is oklch() supported in all browsers?

Yes, as of 2023 oklch() has full support in Chrome, Firefox, Safari, and Edge. For older browser fallbacks, pair oklch() with a HEX or RGB fallback: color: #a78bfa; color: oklch(72% 0.20 293);

What is chroma in OKLCH?

Chroma (C) controls color saturation/vividness. A value of 0 is neutral grey; values above ~0.3 are highly saturated. The maximum displayable chroma depends on the hue and the output device's color gamut (sRGB or P3).

What does "P3 gamut" mean?

Display P3 is a wider color gamut than sRGB, supported by modern Apple devices and many HDR monitors. Colors with high chroma values in OKLCH may be P3-only and won't display accurately on sRGB screens. This tool flags when your color exceeds sRGB.

How do I use OKLCH in Tailwind CSS?

In Tailwind v3+ you can use arbitrary values: bg-[oklch(72%_0.20_293)]. In Tailwind v4, OKLCH is a first-class citizen β€” define color tokens directly in your config using oklch() values.

Why use OKLCH instead of HSL?

In HSL, changing the hue at the same lightness value produces colors of very different perceived brightness (e.g., yellow looks brighter than blue at the same HSL lightness). OKLCH corrects this, so your UI components stay visually consistent across colors.

How is the contrast ratio calculated?

We use the WCAG 2.1 relative luminance formula, comparing your color against pure white (#fff) and pure black (#000). WCAG AA requires 4.5:1 for normal text, 3:1 for large text. WCAG AAA requires 7:1.

Can I enter colors in other formats?

Yes! The hex/color input field accepts HEX (#rrggbb or #rgb), RGB (rgb(r,g,b)), and HSL (hsl(h,s%,l%)) formats. The tool converts these to OKLCH internally and updates all sliders and outputs automatically.

OKLCH Color Picker β€” The Modern Way to Work with CSS Colors

The OKLCH color space has emerged as the most powerful tool available to web designers and frontend developers in 2024. Unlike traditional color models such as HEX, RGB, or HSL, OKLCH is built on a perceptually uniform foundation β€” meaning that when you move any slider by a fixed amount, the visual change you perceive is consistent and predictable. This property makes OKLCH invaluable for building design systems, accessible color scales, and robust UI component libraries.

πŸ’‘ Looking for premium CSS templates and UI kits? MonsterONE offers unlimited downloads of templates, UI kits, and assets β€” worth checking out.

What Makes OKLCH Different from HSL?

At first glance, OKLCH and HSL look similar β€” both use three axes to define a color. But the difference lies in how Lightness is computed. In HSL, "lightness" is a mathematical shortcut based on the maximum and minimum channel values of RGB. This means that two colors with identical HSL lightness β€” say yellow and blue β€” appear dramatically different in perceived brightness to the human eye.

OKLCH, developed by BjΓΆrn Ottosson as an improvement over the CIECAM02-based LCH, uses a lightness axis calibrated to human vision. Yellow and blue at the same OKLCH lightness will genuinely look equally bright. This is critical when building accessible interfaces where you need consistent visual hierarchy regardless of which brand color you use.

Understanding the Three OKLCH Axes

L β€” Lightness (0 to 1 or 0% to 100%): Perceptual brightness. A value of 0 is pure black, 1 is pure white. Unlike HSL, this axis is calibrated to human perception, so a 50% lightness truly appears as a midtone across all hues.

C β€” Chroma (0 to ~0.4): Colorfulness or saturation. A chroma of 0 produces neutral greys β€” the hue is irrelevant. Higher values produce increasingly vivid colors. The maximum achievable chroma before a color leaves the sRGB gamut varies by hue; oranges and yellows can achieve higher chroma within sRGB than blues and purples.

H β€” Hue (0 to 360 degrees): The angle on the color wheel. Red sits near 30Β°, yellow around 100Β°, green at 140Β°, cyan at 195Β°, blue at 260Β°, and purple near 300Β°. Because OKLCH is perceptually uniform, interpolating between two hues produces a natural, predictable color gradient without the muddy midpoints common in HSL.

Browser Support for oklch() in CSS

As of Chrome 111, Firefox 113, and Safari 15.4, the oklch() CSS function is supported across all major browsers with full global coverage. You can use it directly in your stylesheets:

.button {
  background-color: oklch(72% 0.20 293);
  color: oklch(10% 0.02 293);
}

/* With alpha channel */
.overlay {
  background-color: oklch(20% 0.05 240 / 0.8);
}

For maximum compatibility, you can provide an sRGB fallback before the oklch() declaration. Modern browsers will use the last valid value, automatically choosing oklch() when supported.

OKLCH and Color Gamuts: sRGB vs P3

One of the great advantages of OKLCH is that it can describe colors outside the sRGB gamut β€” colors that can only be displayed on P3-capable screens (such as modern MacBook Pros, iPads, and many Android flagships). These "wide gamut" colors appear more vivid and saturated than anything achievable in hex codes.

Our OKLCH Color Picker detects when your chosen color exceeds the sRGB gamut and flags it accordingly. Colors within sRGB will display identically across all screens; P3 colors will fall back gracefully to the nearest sRGB approximation on older displays, but shine on P3-capable hardware.

Building Accessible Color Palettes with OKLCH

One of the most practical applications of OKLCH is generating accessible color scales for design systems. Because the L axis is perceptually uniform, you can create a 10-step scale (10%, 20%, 30%... 100%) and trust that each step has a visually even spacing. This is impossible with HSL without manual tweaking for each hue.

Our built-in lightness scale generator (visible in the right panel) automatically generates 10 lightness steps while preserving your chosen chroma and hue. These steps map naturally to Tailwind-style scales (50, 100, 200... 900) or to CSS custom property token sets used in design systems like Radix UI or shadcn/ui.

Harmony Generation in OKLCH

Classic color harmonies β€” complementary (180Β° apart), triadic (120Β° apart), analogous (30Β° apart), split-complementary β€” are all available with one click. Because OKLCH hue is perceptually uniform, these harmonies produce results that feel more balanced than their HSL equivalents. A triadic set of oklch colors at equal lightness and chroma will genuinely look like three equally prominent colors, not a dominant-and-two-supporting arrangement.

OKLCH in Design Systems and Tailwind v4

Tailwind CSS v4 embraces the modern CSS color stack, making OKLCH a first-class token format. You can define your design system's color palette directly with oklch() values, gaining full wide-gamut support and predictable scale generation. Our Tailwind arbitrary value output (bg-[oklch(72%_0.20_293)]) makes it easy to prototype in any Tailwind project without modifying your config.

For design systems built on CSS custom properties, the CSS Variable export (--color-brand: oklch(72% 0.20 293);) gives you a token ready to drop into your :root block, compatible with any framework that consumes CSS variables β€” React, Vue, Svelte, vanilla JS, or server-rendered PHP.

β˜•