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:

3A7F3E
F37444
2714A8
7FC7FA
25BE1F
EF1045
5A4A3B
A365FA
DCA1FF
84F83D
A30E84
58DEAB
31E521
62838E
A84BDC
BD603B
556F08
A44D37
96FF29
F4AD3B
446DDB
5BC914
ACB26B
1ADF79
220694
11B926
4E4E7F
C0772B
560168
342435
65859D
F86271
F5D726
900917
6C5643
74D3C2
4E2FA1
BA5ABC
330D05
89F4BE
263499
E98AB0
53E1BC
129C56
66CE6F
A09480
2BA8A9
DB8049
3B680C
45BB2C
6C4F00
E754FB
D919E8
F139A4
D2212C
1B78E8
ACF09A
B4E01A
8A3F3B
66C929
7B259B
F5D33D
2FF4AE
D623E6
7E82E1
3A7B5B
F69939
F602F3
B976DA
1488A4
F1A27C
27AEF5
9A8F82
08018C
071774
8C2349
720715
9A1B9A
259FCB
80105E
F392BE
C377FC
8E4ED1
F1AEBB
88BF19
9C4A20
27E326
B03217
412496
2A57CC
F621B1
FAE579