All RGB Colors in One Image
There are 16,777,216 RGB colors with 8 bits per channel, and a 4096×4096 image has exactly that many pixels. Pick a layout, draw the image in your browser, check that every color appears exactly once and download it as a PNG.
Generate the image

256 squares of 256×256, one per blue level. Red grows to the right, green downwards.
Drawn in your browser, nothing is uploaded. Takes a few seconds; the Hilbert layout takes longest.
The numbers
Each channel of an RGB color, red, green and blue, takes a value from 0 to 255. That gives 256 × 256 × 256 = 16,777,216 combinations, every HEX code from #000000 to #FFFFFF. A square image of 4096 × 4096 pixels has the same count, since 4096² = 256³ = 2²⁴, so it can hold each color once with nothing left over.
The colors make a cube, and a picture is flat, so no layout keeps every pair of similar colors side by side. Measured over all neighboring pixels, here is how often neighbors are the same or one step apart:
| Layout | Neighbors one step apart | How it is built |
|---|---|---|
| Tiles | 99.6% | 256 squares of 256×256, one per blue level. Red grows to the right, green downwards. |
| Hilbert curve | 65.9% | The color cube walked along a 3D Hilbert curve and laid on a 2D one: neighbors are close, with seams. |
| Sorted by HEX | 49.8% | #000000 top left, then every code in order, row by row, to #FFFFFF bottom right. |
One step is invisible anyway. Between a color and its neighbor one step away in a single channel, like #804020 and #804021, the median ΔE2000 is 0.22 and the largest we found is 1.19 (200,000 random pairs, sRGB, CIEDE2000). A difference of about 1 is a common rule of thumb for the smallest one people notice side by side, so any banding you see comes from where a layout puts its seams, not from the colors themselves.