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:

24DF28
7B2779
078558
CBCE12
CD71EE
F3D26F
BF031E
B25AF2
1F7608
B9F76A
3BB609
3BE2F0
BC32B2
E42A7D
641B3F
314098
E34A6B
16651A
34752E
011D57
24B39D
3743A4
D4C562
332436
699034
89FA3E
78D500
88B15F
010A8E
7754B5
3D0AD9
0AD64A
959926
B82C24
791DF0
4A2F5C
147896
FD990D
BC6DF7
993D01
3A1599
EA1E33
157BD0
1CA5FF
0F03D8
8D8782
79ADDF
214856
7205C0
59E2DB
0E0013
6B79F7
7F9620
8FC125
CFABDA
8AC284
DA72E5
7DCDEE
4653A2
365EEC
7A32C6
B88FE0
AFCCAE
DF455C
3810E1
E8BDFF
504DBF
1B93F8
DD81A3
CAF90D
2274CB
467D93
38DED8
57238B
AA7325
AA182F
6FFE25
316D17
129CC3
7C86CE
254631
C0B3BD
4344B0
B6B7AB
3DC20E
CFAA15