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:

129E66
221808
4E48E3
A8C618
8A3019
E55232
B81938
84D7FB
2E8E84
408427
A55B23
2C4CEA
872038
1E04A3
30DB43
85155F
3D70AE
5DF127
E8D243
3C315A
25906C
B75EFA
418756
C70FE5
8D6F82
0BA108
71F148
49738E
70F141
D04C92
E92C3D
39E3CA
23816D
5366FC
37344B
0F2D4B
F62CF0
01EF93
EEC7F6
41D9DB
916874
D75ACB