Skip to main content

Gradient Sort

The first and last tiles stay put. Swap the ones in between until the colors flow smoothly from one end to the other.

Getting today's puzzle ready…

How to play

Tap one tile, then another, and they trade places. The two end tiles are fixed and show where the gradient starts and finishes. When every tile is in its place the puzzle is done, and your score is how many swaps you used. The result also shows the fewest swaps that could have solved today's shuffle, so you can see how close you came.

On a keyboard, move between tiles with the arrow keys and press Space or Enter to pick and swap. At most two of the middle tiles start in their correct place.

Where the colors come from

Each day two end colors are picked at random, one clearly lighter than the other, and the ten tiles between them are spaced evenly in OKLab, a color space published by Björn Ottosson in 2020 and now part of CSS. In OKLab, equal steps in the numbers look like roughly equal steps to the eye, so the gradient has no sudden jumps or flat stretches. The game also checks that every neighboring pair differs by at least 3 in CIEDE2000, so no two tiles are indistinguishable.

Mixing the same two colors in plain RGB numbers gives a different result. A blue-to-yellow gradient in RGB has a middle that sits at a darker, muddy gray and brightens unevenly; in OKLab the brightness climbs in even steps and the middle is a lighter gray. Neither keeps the middle vivid, since blue and yellow are opposites; that takes interpolating hue as well, which is what OKLCH does.

Gradients and image files

Smooth gradients are where image formats struggle. GIF and 8-bit PNG can only hold 256 colors, so a long gradient breaks into visible bands, or into dither dots when the encoder tries to hide them. Heavily compressed JPG and WebP can show blocky steps in skies and soft backgrounds. A gradient with twelve clear steps, like this puzzle, compresses well; a perfectly smooth one is the hardest test for a lossy format.

FAQ

What's the minimum number of swaps?

Count the cycles in the shuffle: tiles that sit in each other's places form loops, and a loop of k tiles needs k − 1 swaps. The game shows this number after you finish.

Some tiles look almost the same. Is that intended?

Neighboring tiles always differ by at least 3 ΔE00, which is visible side by side but subtle. Compare a tile with both possible neighbors rather than looking at it alone, and check lightness first.

Do undo moves count?

Every swap counts, including swapping back. Think before you tap.

Related

This page was last updated on 2026-11-30

Other games