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:

7CDCCF
AE60A9
A70C6F
82F282
3FE646
E0ADF1
0FEAFE
6F6614
95D2DD
656D35
8B1F2C
B96FFB
8A8DE5
2B0323
4FDED1
FC31C8
820212
C9C751
0FFC9A
C21829
C642F7
6F95B4
EFE971
D57F5B
0B7FC1
028CAE
4A8DEB
7C368E
FCA174
F5C78D
5DA2E1
96F046
116B93
6A1583
07D1E2
01CBA9
70B3E8
B6C8B4
BEC1E9
1ECB9F
FEEB6A
367AA7
C90087
5229D4
AAE565
DCC474
2EDF3C
24CCFF
69E4B5
131B8A
B5516D
88FE7B
D2F978
55AA0F
9F78E3