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:

B68E7F
B2D979
BC8F09
32EA9F
ECBF7A
C5D104
F3525D
FC571C
4F4982
479CEE
63497D
8F217C
4A9731
7404B7
DD031E
545836
86C4E2
CBFADD
6C6431
984FDE
47CF26
860DAF
0EAABA
D84F96
8ADC5C
2D5F71
2D6004
974E52
15A4CC
5D81AB
A17DD2
59453B
B3A421
940ECC
498A4E
79EE1C
6973FD
D52338
1CDBB2
96DAE2
53E750
A2A67E
1D4AAC
556642
AF981E
DD5FD8
AB0B26
5DD8E2
451744
6B7B29
B72EFF
E7E6AA
5BC441
6575F1
C7B289
F43272
01534F
F406A0
8194A6
812794
2C998A
797EE0
450524
030E66
B9BCDA
AEF1F5
8233B1
23C2AD
F5B06B
130039
323519
541784
6C294E
79B7C5
7F4006
9C31A2
F576A3
80D3F4
688461
78165C
AE1A55
2D99E5
B0A81F
DF3B64
6A1E05
5FCA47
F2057C
61E690
A0F9E6
7C3FD6
ACCF42
FCB34B
0FFAAE
BCE591
EB5843
44A007