This code generates this picture http://allrgb.com/dla which uses each 2^24 color once and only once. DLA rule is tweaked a bit to generate nice picture. Save as dla.cc , just compile it cc dla.cc, and run "a.out Number.of.Seeds" // Bits per plane. Must be even and <=8, namely either 2, 4, 6, 8 //Uncomment these for 4096x4096 //#define CBIT 8 //Addressing scheme 4 is fastest for CBIT=8 //#define A