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:

05E382
71BAAC
D26D26
FB2892
B96243
BE49AA
151C8E
B6DB2D
F4E72A
3ED31E
FB6B91
EC9239
D43CD4
FF15D4
3D04F6
4FE22C
999094
72891D
7A417C
9100D1
660DDC
3E3012
35528E
F381F2
5D6D1F
54806D
0F3B33
010085
DED967
00C5C7
0DA0CC
410ED0
A83B1F
A93303
E71844
8C3CFA
2E86FE
79E54A
F6A80B
8A0D39
D79254
A9ACA2
9ADCF9
74BA8F
32E40C
1D9D09
9C2D9C
5A5793
CFF7AF
E89C0D
2AD4FF
917220
C665B9
B0891E
78053F
73C021
0A152E
E92215
8BD2B6
25E174
A2704C
FBC7E4
3BA60D
8B7D36