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:

EC5046
3FA8E5
9D4A10
C795C2
C4A25A
89AFA7
A9076F
2D922B
B2D2FB
408B88
731693
F34296
DBD82D
CDABC2
0D3FAF
7B04C6
835BF6
EFDBBB
DC6E00
2CAD2F
ACB523
2A4943
E4F61C
7DD428
75BFFF
BD8811
6EA6AB
292D30
835C95
3EE0E6
FBEE01
9C41C6
3B6108
3E9300
31A59A
B1D146
CF3339
53119B
33FCA0
3050B7
4D5444
1325D0
DCF00A
6E6AA3
326658
982165