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:

B5BC28
EFBBAD
318E69
2BB37F
E24132
FCECC8
14E24F
6F99A9
1D5041
8423B4
B0E644
46B79C
E011CF
A024D2
4EAE1E
536896
70AAAF
0FD6AB
3CBEA8
478427
3508EE
0ABC76
B709E8
4C580F
460EF6
088FEC
C7C1FB
F9A0C8
39C9B1
6116C3
BCB508
6DBC30
84C899
98D4A8
7CCAC0
6EDC5B
B961B4
F844DC
B8C747
632E7D
ED8A20
3BB71B
13BD23
61CD75
E04E16
C27647
795829
60BA41
0011B1
87F727
8F8B53
14AE20
805DD4
B8CE28
489FEB
4789B4
AB1656
4561A0
064504
448089
08FE53
A49B78
23B7D2
8A6CED
FDEA25
4A96C9
F23835
D5E33F
242CE3