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:

F0AB3F
A12B22
5035BC
624AEF
048E66
E45EE0
46ECF2
157C82
05B330
E2554A
4DDFFE
19E246
C361AB
5788E9
9DFBD3
E673A2
1C0C18
717E2C
791774
5E52C1
2FC64D
7B6A73
59059A
D2CC3F
C1DF7A
5E8C77
65A48C
9D157F
FA45F1
3C17F9
52BE1B
5B4FFD
AD7C2E
EC63B0
D979F6
BA8E9F
486E39
8C2251
5CEAAA
94705E
0912EC
26CAF6
6D2960
883581
A2AD0B
109711
D0352F
0C88F7
6C2E39
877249
8D3DFE
4F0469
C5A52F
A135B1
3EDA96
21B191
118A00
BC6F42
6C48E5
26FB06
576A83