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:

869B6F
ED4B5D
3E816C
B1CC97
16BA85
E646FA
D367C9
02F82E
3AA824
293A55
C8301F
A5FDB4
03DEBB
4CAB06
B79363
9DF2A3
BEABCD
4BC8F2
2B9727
B197BF
4C816B
83F248
D31859
DA5A5B
0FB571
D71EF7
9158E9
F6E967
C738C1
4E192C
BA5B49
37BB96
8E1FF0
9FDE63
B2E9EA
8D5D45
D64C20
7D154A
EA7043
190E21
8C88DF
E009F6
DBAE69
7E8068
9D225D
05ABB9
D9B1D3
E49E49
AC02C2
49175C
F3B556
F2FB0D
B55A36
3FA3F2
551048
2EC7BA
11C6F2
DE4E2D
CFFD88
BEEA88
5583CE
43F094
27D1B7
027A67
DA5C1F
479404
974211
EC4612
900E84
47715A
B43267
E37200
B3DEF2
5318C7
609CBF