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:

1AF915
F22E81
77DA6D
13CFA4
2BB539
B171CB
1785BC
D5BD84
272364
38B5F4
34BD25
30410A
C65CF0
313901
55A281
FF8A70
3F6944
5B47E1
3722E8
B81BCC
3A3A60
8308BA
9F9967
2CAB71
578E84
41715C
D8879E
0656DD
3C0B71
7EC22D
4C401A
5D2743
B17B61
374C08
ADEB4C
41F36C
EA5E82
2331D9
8BFD65
534547
63730B
E89881