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:

45F664
A3C3FD
8CB383
F8FDBD
B34A54
82ED46
E3C3B1
436A7B
587420
F3EDF4
DEB6B1
A4115B
15160F
CABACA
E72A6E
F643D3
782039
0B3078
49E48C
364DD5
0F2D42
F5A9B6
034C26
1A1CC0
D3172C
9EB1B8
3939ED
21EFCA
1F3583
76DAF9
BB1342
A7333F
B12834
5E02C0
97D6F5
61A92C
FDA832
B84954
8BA853
C3D296
17643A
1D7BD0
18A1A6
3F6A8A
CEE619
C24998
0641BD
1216B7
1BF2DB
EC03A8
CFEBEA
4EC168
8B3567
0E25D4
28D498
8A2A5B
597C58
66ED51
C0750B
2D86F0
7BBCFC
A801B0
7E7AFE
7D9B53
1B97E8
E50710
E23730
C63E98
372CAF
4BC0D8
065D24
0E94DA
639FAE
73FF6F
FB18D1
FA5AF1
F3F3D1
A9F0D4
EFF8AB
6B7385
05E194
7343E9
47C746
16A33E