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:

98F905
F618A8
5101B3
596DD8
071FC0
38BD8B
DA4627
F2A3C0
B2F75A
106F92
C706C7
BAAA41
309770
4EAE94
7872D4
E2F1FD
52B87E
2E6A53
8A9364
CB4485
8C8222
F7B446
458AFD
587C56
5B51DA
595B98
2333F1
4DEAAC
8B6BC0
EDD5B0
40563D
71ECC0
C0E60F
DF5923
626230
351420
BE9003
28C82D
5F6388
6C7708
3E9436
6A5D23
B7A244
FC4239
E9A3CA
B92118
F7F9F7