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:

96E374
380471
9747D7
46A245
BE99C5
7AD34D
CAC5BD
C5C0E7
CCE081
19EA96
915AE2
6E1134
A966BF
23D934
0950FC
E692E5
7A4244
1D5D34
B606E8
2A5AF3
854691
A2A7D2
51CD74
DA23BA
AFCA33
AFF625
7D50E3
6F1A80
6B4F75
76E1F1
94BC0A
544C61
EA0471
A20F53
A1B019
6FC84A
680826
12A135
031646
782263
572AAE
7DE9C3
490381
7F853B
9126EF
61C3EC
4C0767
AA93EF
F77061
27BF90
67BFCF
C886A5
82D9F2
2077DE
D6C81E
F22284
2B599E
4ED8FC
E35D70
3950BB
0E46F1
977E97
4AD485
5222D9
47E8FE
97E483
D472CE
E0491A
96DBF1
1AC8B0
5AE223
E52EC2
FAD114
15E290