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:

F8BE3A
77DC6B
4A9075
D2E2E3
4F2A62
D191C8
8EC854
C80819
98B528
7EFF0A
7B4781
5ABF07
F1552A
4027B5
DCEB5B
5166DD
2F74A4
02AA66
A099C3
E5F1D4
295AE7
EC1B1B
EBF716
42A1A7
E5A4DF
5BF901
DC5746
A26FAB
FDC3B2
E36947
D6E237
AF9E24
923344
A05A66
24F6C4
813D5D
26FE2E
D0B4EB
44F80F
81D47B
D7DF71
56A045
5B7C63
BDB357
880771
7A5D6D
DBFAAD
1DDE0D
56B61B
5772D5
AD029B
4CC6FE
BB3608
B024E8
0FE344
776225