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:

163B1F
BFF9E7
BCAEE6
675ED5
BAC890
31E76C
B72ABC
C47B7B
4DE81E
A3799D
ACF8EB
A9528D
710AD7
49E8D9
376D34
27813D
5AC6ED
D3B79C
3DDAAF
F1BD91
30D59C
550F8D
8ABBB7
4D0C40
DBCCFC
379704
C94787
1EA4D0
ED6A92
C25F99
DD8C7F
7DA414
42C288
AC160E
C0DDDB
F44630
2C2148