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:

D76ECD
645D40
AB9A21
CFAE3A
D147F1
507082
6F4F9A
9B4D96
F519C0
3A21AC
A9B853
E4576F
5E0548
05DE5F
A9E771
3C4BA7
64BDAB
01B2B8
8DC6AB
5C9179
9B293D
C7CB4A
7EA047
D425DB
95F8F4
67226E
8FAAD4
847EDC
3EBC11
B8FF66
7DA250
6D0E68
878C25
8BCF97
83F32D
A9D54B
14A5D7
19434D
C2750C
7E9D54
53B94D
0427F6
3D0A89
9EB4CC
13C9FF
D7BB7D
93FD0F
F15FD5