Last year, there was a very popular challenge to create an image containing every 24-bit RGB colour.

My challenge is to create a smooth animation (24 frames/s say), where the colour of every pixel of every frame is unique. I will also allow duplication of colours as long as every colour appears the same number of times (greater than 0), since otherwise the animation will have to be short, or the frames small.

I have produced some examples here, based on the winning solution to the 2d version. Unfortunately, it seems you can't embed videos, so links will have to do.

  • 1
    \$\begingroup\$ Someone already did an animation in this answer from the linked question. I'm not sure if it meets the criteria, though. \$\endgroup\$
    – mbomb007
    Sep 11 '15 at 16:50
  • 1
    \$\begingroup\$ Bit more technical specs would be nice. What does "create" mean? Render a video to disc? Display a realtime animation? \$\endgroup\$
    – user42643
    Sep 12 '15 at 16:14
  • \$\begingroup\$ You could use a gif... \$\endgroup\$
    – wizzwizz4
    Dec 21 '15 at 19:21
  • 1
    \$\begingroup\$ @wizzwizz4 a GIF cannot hold more than 256 colors; so you can make a 16x16 image with different colors for every pixel - and have no room left for animation. \$\endgroup\$
    – Titus
    Sep 22 '16 at 10:38


This is a straightforward implementation with each rgb colour occupying an intersection in a 256 by 256 by 256 unit grid.

The jerkiness seems to be an artefact of the video, not an error in the data, which should be exact.

red values increase downwards, green values increase rightwards, and blue values increase by frame.

Perhaps I'll jumble things up later.

f@b_ := Image@Table[{r, g, b}/255, {r, 0, 255}, {g, 0, 255}]
Export["c.mov", Table[f@b, {b, 0, 255}]]

QuickTime clip

  • \$\begingroup\$ This is puzzling. It works for me and the permissions are set for anyone to access it. Are you able to play other videos at vimeo.com ? \$\endgroup\$
    – DavidC
    Sep 12 '15 at 19:12
  • \$\begingroup\$ It does work now, for some reason. \$\endgroup\$
    – Fatalize
    Sep 12 '15 at 19:15
  • \$\begingroup\$ glad to hear it. \$\endgroup\$
    – DavidC
    Sep 12 '15 at 19:15

PHP (+ HTML) + JavaScript

Part 1
generate 256 images with distinct red values from 0 to 255;
green value=row index, blue value=column index


Note: Depending on Your PHP implementation, this may throw an internal server error.
If it does, take the lowest number of the images that already have been created, insert <number>, after $r= and run again.

Part 2
loop through these images from 0 to 255 and back (0 and 255 taking 2 frames each)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.