Home
Source Tarball | Source Zip

This little page does a few nifty things via PHP:

  • Generates a random quantity, between 1 and 100, of hex color codes.
  • Calculates the best color, either black or white, to use for the text to show up when displayed on top of the color.
  • Populates a little div block with the color as background and the label with the white or black text.
  • Calculates two darker shades of the color to be applied to the various parts of the object.
  • Randomly picks one of two different object templates. One faces left, the other, right.
  • Paints three of the parts of the object shown below
  • Combines each of the four parts as layers into a single little object image to be displayed next to its color block.
  • This is the right-facing template:

94971A
4EE3D8
FF6B22
019903
14245E
7E9817
13F263
CDD00A
60B391
490871
3A58B9
8D9694
0F30F6
D768A2
62E31D
2CC892
41148B
9584E3
3B88FA
ED82D7
F7497A
51B163
C250D9
B19A81
46B24F
A30BC3
7F5580
3E655C
2B32F5
C2FE14
3DDFED
322147
70B477
27569D
5C8020
2DB3C2
29188D
F67C86
F86102
7FFBB0
E2BCF0
3C6D99
7687FD
335DCC
0901A2
4956B3
B28849
759A94
579C57
B47EE0
3DEB41
7EACDE
1E20D8
4BA658
AC85E4
1DA98C
4EE9E6
9C18A3
ED4EFB
4F4635
CA54C1
86FA1F
0F2FFE