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:

E79B35
42B338
8786D8
044FE6
6919EF
AE861A
1A5AD7
3CFDB2
AD6B62
B3601F
662144
6B51D3
00E064
E14589
617738
DED375
83BB8F
CC8BDD
347C5C
F7ECD8
1DC5E3
88B569
B72694
6389D1
A6CC2A
F89552
408A04
921B46
4205CC
893EBF
67856D
A18887
B86EDB
A266B1
617E59
599C40
4C686A
E94861
EFAAC8
69C18E
20F6A9
F505AA
967683
735E62
F83624
7B3149
CD95F0
9B12FD
3AE0E6
1F79CF
38E307
18A9FF
82749A
5274B9
3341F2
AA12EE
F0EC77
B9BA29
269847
3F2C6A
8E1528
D4E3ED
1A83D1
BE6353
5F72FD
D5DCC1
58AFBC
7DFF48
1CA0E6
13DF59
DDD635
1C3BFE
8F7BE0
03A1AA
B4EB1C
3B1248
F5291B
C79FB3
FBF95B
E5D883
D8FF79
470B00
72D4E0
266011
038885