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:

CA6CFD
C7A6D5
9DE637
1ACC04
EA9B22
5878AC
57F7EC
C55FAA
77F8E9
DCE97E
7FEE29
CDAB90
4133BD
4EEAA6
F05798
D5354A
96738C
8114A2
886512
74941D
241D80
AFCED7
9C5F65
E54BE0
CBD845
1D9133
07C747
B53BC7
8B3C6E
F6DCE6
D330E4
206175
9C48E7
D578AC
DD4B07
C3699E
24F440
842D12
C0D314
74ECA7
C23E56
3AFD4E
16BEFB
F89EA4
956446
3CC2DC
1A3F7D
082CD6
CC5EF9
4BB049