A color gradient puzzle challenges you to restore eight shuffled HSL color tiles in the correct order by following the shortest continuous hue transition, including the 360-degree wraparound. The Color Gradient Puzzle tool simplifies this task by focusing on a single rule: arrange the tiles so their hues progress smoothly from 330° to 40°, wrapping through red (0°) along the way. Unlike traditional sorting, this puzzle requires recognizing that hue is circular — 350° is followed by 0°, not 360°. The game uses the CSS "shorter hue" interpolation method, which selects the shortest arc between two angles before generating equal steps. This means the sequence advances by 70° through the wraparound, not backward by 290°. The eight expected hues are 330°, 340°, 350°, 0°, 10°, 20°, 30°, and 40°, though the tool doesn’t display these values visually. Instead, you rely on the smooth transition of colors to guide your arrangement. The puzzle is keyboard-friendly, allowing you to select tiles with Space or Enter and move them with the Left and Right arrow keys, or drag them into position. A correct arrangement earns you 1,000 points, while two incorrect checks end the run until you restart.
This puzzle isn’t just a game — it’s a practical exercise in understanding how hues wrap around a color wheel. Many people assume hues progress linearly, but in reality, they form a circle where 0° (red) follows 350° (a deep red-purple). This circular relationship is why the puzzle feels tricky at first. The Color Gradient Puzzle isolates this concept by keeping saturation and lightness fixed, so you focus solely on hue order. The tool’s design reflects this intent: the tiles use the browser’s hsl() syntax with 72% saturation and 52% lightness, chosen for clarity rather than perceptual uniformity. This means equal numeric hue steps may not appear equally spaced visually, but the puzzle isn’t about color perception — it’s about mastering the circular logic of hue interpolation, a key concept in CSS and digital design. Try the Color Gradient Puzzle to do this in your browser.

Why the Shortest Hue Arc Matters
The "shortest hue arc" is the core rule that makes the Color Gradient Puzzle unique. In CSS, hues are represented as angles on a 360-degree circle, and when interpolating between two hues, the browser can choose between two possible paths: the shorter arc or the longer one. For example, the distance between 330° and 40° can be measured as 70° (330° → 0° → 40°) or 290° (330° → 320° → ... → 40°). The CSS Color Module Level 4 specifies that the default method is the shorter arc, which is why the puzzle expects the sequence to advance through the wraparound rather than backward. This rule ensures smoother transitions in gradients, avoiding abrupt jumps in color. If you naively sort the hues numerically, you’d place 0° before 330°, breaking the intended visual flow. The puzzle forces you to think about hues as a continuous loop, a skill that’s directly applicable to creating seamless gradients in web design or digital art. For more details on how CSS handles hue interpolation, you can refer to the W3C CSS Color Module Level 4 or the MDN documentation on hue-interpolation-method.
| Hue Angle (°) | Color Appearance | Next Hue in Sequence |
|---|---|---|
| 330 | Pinkish-purple | 340 |
| 340 | Light purple | 350 |
| 350 | Deep red-purple | 0 (wraparound) |
| 0 | Red | 10 |
| 10 | Red-orange | 20 |
| 20 | Orange | 30 |
| 30 | Yellow-orange | 40 |
| 40 | Yellow | — (end of sequence) |
How to Restore the Eight Shuffled Tiles
Restoring the eight shuffled tiles in the Color Gradient Puzzle is straightforward once you understand the hue wraparound. Follow these steps to complete the puzzle efficiently:
- Inspect the tiles: Look at the eight shuffled color tiles and identify the smoothest transition between them. Remember that the sequence starts at 330° (a pinkish-purple) and ends at 40° (yellow), wrapping through red (0°). The shortest path advances through the wraparound, so 350° should be followed by 0°, not 360°.
- Choose your control method: You can drag tiles into position with your mouse or touchscreen, or use the keyboard. To use the keyboard, press Space or Enter to select a tile, then use the Left and Right arrow keys to move it to the desired position.
- Arrange the tiles: Start by placing the tile that looks closest to 330° (pinkish-purple) at the far left. Next, find the tile that appears to follow it in the sequence (340°, a lighter purple) and place it to its right. Continue this process, ensuring the transition looks smooth. Pay special attention to the wraparound: the tile after 350° (deep red-purple) should be 0° (red), not a darker hue.
- Check your arrangement: Once the tiles look continuous, click the "Check gradient" button or press "C" on your keyboard. If the arrangement is correct, you’ll earn 1,000 points and complete the puzzle. If not, you’ll receive a notification that the gradient is incorrect, and you’ll have one more attempt before the game ends.
- Restart if needed: If you make two incorrect checks, the game will end. Click the "Restart" button to try again with a freshly shuffled set of tiles.
Keyboard Controls for Faster Play
The Color Gradient Puzzle is designed to be fully accessible with keyboard controls, making it easy to play without a mouse or touchscreen. Here’s how to use the keyboard to complete the puzzle:
- Select a tile: Use the Tab key to navigate between tiles. Once a tile is focused, press Space or Enter to select it. The selected tile will be highlighted.
- Move the tile: With a tile selected, use the Left and Right arrow keys to move it to the desired position. The tile will shift one position at a time in the direction of the arrow key.
- Check the gradient: After arranging the tiles, press "C" to check if the gradient is correct. This is equivalent to clicking the "Check gradient" button.
- Restart the game: If you want to start over, press the "Restart" button or refresh the page. The puzzle will reset with a new shuffled arrangement of the same eight tiles.
Keyboard controls are especially useful if you’re playing on a device where dragging is less precise, such as a laptop trackpad or a mobile touchscreen. They also make the game more accessible to users who rely on assistive technologies. For more tips on playing without dragging, check out our guide on how to play the Color Gradient Puzzle using keys.
Common Mistakes and How to Avoid Them
Even with a clear understanding of the hue wraparound, it’s easy to make mistakes in the Color Gradient Puzzle. Here are some common pitfalls and how to avoid them:
- Ignoring the wraparound: The most frequent mistake is treating the hues as a linear sequence. For example, placing 360° after 350° instead of 0°. Remember that hue is circular, and the sequence wraps through red. If you’re unsure, look for the tile that appears closest to red (0°) and place it after the deepest red-purple (350°).
- Assuming equal visual spacing: The puzzle uses HSL values, which are not perceptually uniform. This means the visual distance between 330° and 340° may not look the same as between 10° and 20°, even though the numeric difference is identical. Focus on the smoothness of the transition rather than the apparent spacing.
- Overcomplicating the sequence: The puzzle has a fixed sequence: 330°, 340°, 350°, 0°, 10°, 20°, 30°, and 40°. There’s no need to guess or rearrange the tiles in a different order. If you’re stuck, try resetting the puzzle and starting fresh with the first tile (330°) on the far left.
- Rushing the check: It’s tempting to click "Check gradient" as soon as the tiles look close to correct, but this can waste your two allowed attempts. Take a moment to double-check the wraparound (350° → 0°) and ensure the transition looks continuous before submitting.
- Forgetting keyboard controls: If you’re struggling with drag-and-drop, switch to keyboard controls. Selecting a tile with Space or Enter and moving it with the arrow keys can be more precise, especially on smaller screens.
If you’re new to puzzles like this, you might also find our guide on how to avoid common mistakes in a magic square puzzle helpful. While the rules are different, the principles of careful observation and methodical arrangement apply to both.
Why This Puzzle Is More Than Just a Game
The Color Gradient Puzzle is a practical tool for anyone working with color in digital design, web development, or digital art. By focusing on the circular nature of hue, it teaches a fundamental concept that’s often overlooked: hues wrap around a 360-degree circle, and the shortest path between two hues isn’t always the one you’d expect. This knowledge is directly applicable to creating smooth gradients in CSS, where the hsl() function is commonly used. For example, if you’re designing a gradient that transitions from blue to red, understanding the shortest hue arc ensures the transition looks natural rather than abrupt.
The puzzle also highlights the limitations of the HSL color space. While HSL is convenient for representing colors in a cylindrical format, it’s not perceptually uniform. This means equal numeric steps in hue don’t always correspond to equal visual differences. For instance, the jump from 30° (yellow-orange) to 40° (yellow) may look more subtle than the jump from 330° (pinkish-purple) to 340° (light purple), even though both are 10° apart. This is why the puzzle keeps saturation and lightness fixed — to isolate the hue relationship. If you’re interested in exploring color spaces further, you might enjoy our Color Sudoku tool, which applies similar color logic in a different puzzle format.
Finally, the Color Gradient Puzzle is a great way to practice visual ordering and attention to detail. The fixed sequence and limited attempts encourage you to think carefully about each move, reinforcing skills that are useful in other logic puzzles and problem-solving scenarios. Whether you’re a designer, developer, or puzzle enthusiast, this tool offers a quick and engaging way to sharpen your understanding of color and circular logic.