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:

BAF8D8
CE5E89
5C0622
37EECB
D3E051
D9C535
E5AF3C
F56D6C
DCC369
0FE2ED
D6CD8C
4888A2
5D03FD
FCEDE2
E43C81
70F7C9
1AD3C0
54F8E9
49A109
770EA2
B3CF0E
4441E1
BA965B
C36AB8
B98FE4
377954
BC5B4E
A25869
2D83FE
EC4A03
0C960B
587BAA
55BB0C
F48136
2DC4EC
6DD151
3BE2E6
E14BCD
4C0941
9E2513
0CC75E
13CAD4
1524AC
27BDBF
BE76C5
9B3ABE
B17E77
C91FCE
9666EB
016BFA
5C6564
7FD3DE
E0B9F4
A52E6B
7CD8C6
AA5076
0DBA50
70FE60
84CD30
211560
C406E1
B64B1A
1B8E37
EA9451
77AE0D
828B35
5D27CC
DBD79F
D1A0C4
7DA7AE
A52515