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:

ED8623
31CDC2
F9E3B4
4C0003
DB8C6A
C57A79
51D798
9E4B2C
368729
C87592
473BEA
5EDB9E
9BBAF0
E404FB
45CCAC
47E050
B23B0F
3006F1
6337FA
DF5F1B
FC3866
79FB73
3D31CE
11D7E8
F3A15B
821421
830388
43DAF1
7E2BF8
312E18
65B1F7
42115A
528863
7BB19F
B3759E
548219
64E5B4
746858
D84C89
54BAFC
0CB63B
0C56DE
1901FF
21A94A
57B590
E391F7
140BAB
6A610D
D4EF4B
D3B8EA
63BCD8
AAA3EA
737DB6
CE4053
F7E8E3
61B3EC
B3A432
AA73A3
4F01A0
9FB951
050310
BC6CA4
CC7E48