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:

4B9430
19C06D
68195E
60C19D
DE4C43
C63AC8
3CCD9D
FD545F
B580E0
93516D
F0134F
DEFC76
695668
BCFBA8
D1A7AB
9A115A
259E0D
860E4F
FC3A27
2B51BD
D1C9D1
1F7A91
B80DCD
163AF1
9269C0
5B30E0
ABC2C6
156D73
8B0D99
685566
263AA1
34C568
79B295
C77B7A