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:

975701
9EDF29
1A0778
83BA3A
C86989
94AF8F
745A5F
3D411E
90AB6C
07CFAC
C864AB
2845B5
87E081
4499BB
C5358D
883D45
39E2D2
3D0072
83C4AF
37D7F4
282393
9F294C
10FB2B
105F27
A8935A
7A04F0
DBD890
1C445A
954063
029611
797C1E
09B595
7C719D
31E601
FB010D
58BCE1
D4798B
589AB9
ED19B7
8FBBFD
5D823C
E9A643
CBC662
0160F4
AB1CDF
FD112D
A762A9
986235
990246
CBF3BB
30E795
A5B75A