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:

60F406
C39BA6
182FB1
32A265
7391CF
C9AC97
1CF92F
68F92E
08CECD
BCC4BA
C90EBE
066ABA
66237D
5E9F64
1701A4
E0E4DA
B740DD
1A3D81
8944EB
DC58F1
9FE980
EA2FB1
CAFA13
9D6DF6
327978
FC37AE
B95105
994BC4
C75420
BA96EE
1880A2
464B43
BDE875
0143C9
F5E6C9
BAE88F
7569EC
8071F6
A83A82
431B2B
87E792
75B6AB
0375A9
02AE95
C9899C
3D27A7
1E4C8E
A4FA72
9D530E
3F06C6
C1A0B8
84541F
FFD4B3
6D60B4
FF3F53
47BDB4
6523BC
878CFE
43494B
1B07A1