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:

F3AF67
E929B5
D61535
BB0E59
C17784
342BA9
CC8885
D84AF5
214E15
3FA20D
95160A
C34365
F306E0
961D29
3B6BCA
1E228D
E4BBAB
055110
6ED287
7BA3F3
54042E
F1BAC4
3F6100
5AA4B3
289100
5E0077
F51C49
C589C5
CE3DB3
A4735F
072D91
1698BE
0EE3C7
754112
6ADADD
7B27B7
5A24B3
440115
F63369
492B02
8E2114
494F49
371CE5
965EED
18FDC0
2E0DD9