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:

4D063C
19C5D8
16BB24
CEA623
7B2800
6B7BDF
3A3D2D
98FE74
5AACD2
4E7D02
FF447F
1AD1DA
ADBB69
B11138
1A2F2E
F97FEF
311C90
E78474
F1FD38
255AC8
14C743
86A3E8
61403C
7133AF
DBDA88
5A2F22
30B023
21A05A
2EE17A
38E9D4
CDA42A
60C762
E5DF6A
B8A11C
40E9AD
2172B9
02AFB3
D06CF6
500B4D
523B3E
117A9D
03001B
B2ABC2
9B1DC9
741E49
7BA0D0
2617D2
49F533
F0FE3A
841229
CF974B
A1C5EF
FA294A
6FAD3B
2F31AB
F8D885
5CFF74
6D3A27
D92101
12C17F
58BEFE
FED3A6
48F715