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:

03C194
B1A863
855631
BFF7B9
881DE2
9D953D
1F9EC8
C77AAE
164138
F6FB80
386E5C
E62389
D6F862
4B8CA1
0C060A
0D08D6
74D8DF
693167
700A75
21C896
70C9BF
92CB7B
310DF7
BDDBA1
D32CF6
BD90E7
350FBE
CFE1DA
E533A0
E7C887
3217D7
FDAF43
117C3C
2FD971
9C7F20
387CA5
6B4BA0
5FD787
BDA5E8
1EFF52
AC1353
D5CE0E
266E96
D70E9A
BC14DF
AB8CFC
2B3028
BFC45F
2B3366
B3EE7F
3B55FA
449E1C
97F640
E8455A
CE9735
1938CD
EECF4F
F8E6B5
3C75A8
BAB15E
B399B0
B42F77
364876
ACB02F
73483B
577D1B
4F3D0D
14E067