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:

DB203B
62C0D3
B8184E
0FE1AB
7EDA07
2A18F7
0F5D12
67892D
E46A45
80D0CF
D68BD6
55F8C7
3753AF
D90956
CD6859
F5ACE9
465D1D
24565F
320E8B
0AABCE
F2CE91
58D411
88F200
365E67
2ED6AC
668F5A
4FBE33
F63DDA
DECE56
F2599C
BB7123
9FE74B
16E19F
B3FEF3
D84A51
793ACE
020646
728A43
D07327
ED9DB5
372CCF
458E46
742CC1
DB56C2
D758A2
7F1265
EF25BF
726DB3
5DBFE8
1B491C
15A40B
E77E37
62AFB8
C4C2EE
B46D7E
94ED2F
27CDE8
F63AE7
68585A
5E2119
D0CD29
E57991
7B9EEC
143A9D
62C1FD