Vinnie Garcia

Interactive OKLCH color explorer

How it worksBack to the demo

Moving around an OKLCH color solid

Click a sphere and you get two descriptions of its color: the OKLCH coordinates used to make it and the hex color sent to the screen. Drag to look around the cloud, or scroll to get closer.

The coordinates are OKLCH. A lightness of 0.5 doesn't convert to a Munsell value of 5; those scales have different definitions.

Hue runs around the center, chroma runs outward, and lightness runs upward. At the center, zero chroma gives you a neutral color. A readout of H=undefined there is expected: hue has nothing to change.

Pulling the colors apart

Lower Hue Steps, Chroma Steps, or Lightness Steps to leave more space between samples. Raise them to fill the gaps. Max Chroma extends the sampled colors outward; Min Lightness and Max Lightness set the vertical range. Keep the minimum below the maximum for a low-to-high arrangement.

Background Color changes the surroundings without changing the samples. A sphere can look different against the new background even though its coordinates haven't moved. The Camera Position controls move your viewpoint directly, as an alternative to dragging.

One label needs explaining: Flat Shading switches between unlit and lit materials. Leave it checked to compare colors without the scene's lighting shading them. Uncheck it and the lights make the spheres look rounder, but their visible brightness now includes that illumination.

Coordinates and screen colors

The code places each sphere with sine and cosine, centers the stack vertically, and asks Culori to convert its OKLCH color to hex. Clicking sends a ray through the scene and reads the first sphere it hits.

There's no RGB gamut filter. A high-chroma sample may ask for a color the screen can't reproduce, and its converted hex value can be clipped. Different coordinates can then share a visible color. Adding more samples doesn't fix that, and the cloud's outline isn't a measured gamut boundary.

For the same arrangement without the panel, there's a fixed 3D wheel. The OKLCH specification and Munsell notation guide explain the two systems separately.