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:

AD35D1
885E2E
055155
3F6679
29D17B
76EF78
58B93B
FF8662
9274B4
026E9F
549B6A
FF52CC
87800B
9CC0A9
DBAC2E
5C57F0
DEFB5D
ED7F18
679BF3
75E589
47E707
1A5482
0720F9
7F51B6
C09F1A
75533C
AF263A
964643
441028
DCC211
7FFDAD
3EE1AA
429580
1866E7
BC4D0F
EC6384
3624C0
D97CB4
EF594A
9F0DAC
86C46C
C1ABE9
A935A9
315D3B
89B3D1
7077EC
FC2951
653D58
828D3A
9C64D0
70F07E
56F128
98771C
2C21B9
24CC44
98FC3B
ED6EA3
2E40B1