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:

C9DB76
CBE18D
2E6D06
EA9CF3
0F667C
ADB917
51035D
9582B1
C5BC6F
0F3A36
1B589F
3647C2
507CCA
1646D2
12CFF7
8BBF74
2FF23D
7E0134
28E3D0
7F9597
3DE3D0
1CC04F
C91D6E
4DBE98
6CF4F6
332B65
32CCF2
E96E89
F36C5E
BDCAEC
77ACE3
E2A752
D49FD7
94EF94
1E72EA
532D15
84C165
98DD39
38E7BF
CB6B54
DE6823
F1D8D5
BC9778
81E80F
022789
7D6868
4352EA
B41AF4
BC5399
C210B3
50C1F7
3C61E5
6DF5A0
B1CDFE
15B559
F040D5
F89EE1
AAE874
84AFBE
821248
D84FE5
90E745
1C2A8F
587470
4AF214
A64A13
4219BB
CB746F
1EB94F
479B6A
2D0B71
8DE071
1B1713