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:

79547F
70D1A4
9D9C74
8733AA
C54D4B
8B2FDB
F2F491
0DE4ED
132371
A11608
118AE1
3E9FBC
6AE848
0B670F
B41E6C
E4794D
BD559D
7DBF22
BBBE6B
DD3A8E
B7E48E
C51AEF
DEA72D
D560CA
6D079E
38F25D
228514
CB4C7A
63C790
9EEEC3
1F268E
23C5CA
BB123B
5A63A0
8FA01F
FF09D7
8EBB26
719C0E
A65FAD
051B01
6281CF
5F3905
B1F23C
DE274B
F88A6D
95F4D8
318C3A
FF98C4
29A4AF