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:

CE6FD0
D9CCF0
5240D4
0A8865
9D5215
7EF6E0
EF9B75
A212A5
22EEF3
3B73DC
CF2F6E
65D1DE
A98C8D
449F6F
3F7A5D
AE0842
55B329
C8D29E
8811B1
65B4A6
343EE5
5BD7D4
860397
FD28B2
A8EB87
DC1570
3B7076
8D24FA
F78470
2689BF
C06ACD
D07506
969613
047FE0
E98EB0
0904D4
98EA19
8F411D
AE4770
BEB7DB
4CFFC9
088573
8884F3
F76A35
DAB588
ECBB79
147692
9B51FB
736711