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:

78CFA6
910338
13244D
2461A8
B84312
146D8F
160BD8
4B1D9C
628F25
80FDDA
C079E4
781247
890CA0
BFDA69
2E6A1A
907398
A77C6F
A03A95
634E1C
D629D9
EF4281
55E3FE
FEB4C7
EEFA2E
208015
D51D4D
93B8B1
7D2DB2
2DC93E
708647
016A35
036E6D
5916B3
199B52
D12249
D71EC5
F18C3A
C053F7
B2EA29
7485E3
65CCC5
0FC1D4
C6778B
9DBB0B
15710C
152F75
CD28EA
7A892F
E5FDC3
3CCD09
5720E5
B971A2
712F30
C52680
EC11BF
16C875
8EFA0A
85B40A
6E675C
2B6D31
7BFA5D
D1C946