The color science behind Huedle
Updated November 24, 2026 · By the Huedle Game team
A gradient puzzle is only fair if the steps between tiles look even. That turns out to be harder than it sounds, because the numbers computers use for color do not match how eyes see it. Here is how Huedle Game builds its boards, and what that tells you about playing them.
Why a simple RGB blend looks wrong
The obvious way to blend two colors is to average their red, green and blue values. The result is often disappointing. Blend a saturated blue with a saturated yellow in RGB and the middle turns a dull grey; blend red to green and you pass through a muddy brown. RGB values are also not perceptually even: a step of 20 in the green channel looks much bigger than a step of 20 in blue, because our eyes are far more sensitive to green light.
For a puzzle, that means some neighboring tiles would look nearly identical while others jump. A board built that way is unfair in places and trivial in others.
OKLab: a color space shaped like human vision
Huedle Game builds every board in OKLab, a color space published by Björn Ottosson in 2020 and now part of the CSS Color Module Level 4 standard. OKLab describes a color by its perceived lightness (L) and two axes of color: green–red (a) and blue–yellow (b). Its key property is that equal distances in OKLab look like roughly equal differences to a human observer.
When we blend corner colors in OKLab, each step across the board changes the color by a similar perceived amount. Blues stay blue on their way to yellow instead of greying out, and the middle of the board keeps its vividness.
How a board is generated
- Four corners. We pick four colors in OKLCH (the polar form of OKLab: lightness, chroma, hue). Two diagonal corners are given clearly different lightness so the board always has a light-to-dark direction, and hues are spread apart so the board has a color direction too.
- Bilinear blend. Each row blends between its left and right edge, and each column between its top and bottom, all in OKLab.
- Gamut mapping. Some OKLab colors cannot be shown on a standard sRGB screen. Those are brought into range by lowering chroma while keeping lightness and hue, so the gradient keeps its shape.
- Fairness check. We measure the perceptual distance (ΔE in OKLab) between every pair of tiles. If any pair is closer than a fixed threshold, the palette is thrown away and a new one is generated from the same seed, so the board stays the same for everyone.
Because the whole process is driven by the date, every player gets an identical board without any server: your browser builds it in a few milliseconds.
What ΔE means
ΔE (“delta E”) is a measure of how different two colors look. In OKLab it is simply the straight-line distance between two colors. A ΔE of about 0.02 is a difference most people can just notice side by side on a good screen; differences above 0.1 are obvious. Hex Huedle and Hue Dial use the same measure to turn your guess into a match percentage, which is why a guess with several wrong digits can still score highly if it looks close.
Why some boards feel harder
- Low-chroma corners. When the corner colors are muted, more of the difference between tiles is carried by lightness alone.
- Similar hues along one edge. If two adjacent corners share a hue family, that edge is mostly a lightness ramp, and the eye finds small lightness steps harder in some hues (especially yellows) than others.
- Board size. An 8×8 board spreads the same corner difference over seven steps per row instead of four, so each step is smaller.
- Your screen. Brightness, night-mode filters and viewing angle all compress the differences between tiles. Playing at full brightness with filters off makes a noticeable difference.
Color vision deficiency
Around 1 in 12 men and 1 in 200 women have some form of color vision deficiency, most often a reduced sensitivity to red or green. For these players, some gradients collapse into near-identical tiles. Two features help:
- Lightness still works. Every Huedle board has a deliberate lightness gradient across one diagonal, which is readable regardless of hue sensitivity.
- Colour assist. In Settings, Colour assist prints each tile’s target number on it. The puzzle becomes a position puzzle, solved with the same swap strategy. These solves are marked Assisted so streaks stay comparable.
Further reading
- Björn Ottosson, “A perceptual color space for image processing” (2020), the original OKLab write-up.
- W3C, CSS Color Module Level 4, which defines
oklab()andoklch()for the web.