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:

7CE926
132A1E
7CC70A
F9C347
D33632
2BF33A
4ED540
C8DC44
48D25F
E044A3
AB0769
D0E07A
AAA335
9BCF9F
79C448
BCA18A
1F2865
5462BC
E31466
7DB0B0
A005D1
9C5DE2
1E5BC1
F38311
95E40A
453D64
6F0982
2EDF8C
26E255
65E790
693144
165680
DACA8A
D4D90A
FD6A7E
6A95AD
8723E0
EA0C46
3960F0
D8929B
5FA122
D4C733
C40C1D
AB8CAE
64AD07
6641B0
C715D9
7D733C
E3C2F3
F0824E
8CAC6E
084525
345CCB
46D8C0
FDD0FE
D83A97
6C02AE
2D0AC0
E5EC05
92DBE3
B38FBF
1673E4
A25D22
C44DDF
84D00F
89E7CB
7F8865
5F5F93
910D9C
A48522
C9D1C8
1AC218
C44962
6E91BB