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:

77AFEF
5BAC24
F4797C
B891DF
B4AE79
DB7599
A1E82D
E1B24C
390FB8
32480E
A944AD
410848
08D777
CD24EF
81759E
E36960
1D5167
5ABFFC
EF01E7
7FF0A8
99DA7C
B13FA9
5C10D3
62FE32
5DD4A6
EBB7F6
D49B90
3E3CC2
20CC84
E4A0B8
500C74
D93846
7BFCB0