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:

AFEA5F
BA5ED6
2EE09E
2B2B17
38DA22
559052
95FB82
84C6E1
A61B94
E8D67F
629D1A
18A375
BCCFA6
34B62C
9DABB5
4DA2A1
83BD17
08D416
F6D461
50B773
A76309
137B2C
FCE3AF
CC7DBB
75D208
B39748
FDFCB8
A17DA7
9D2B07
50ECE3
CB0FB7
4BBFF0
5F6DAD
59EAF2
75802B
194E30
41BAA2
DED5A8
20D4F0
5D8087
BB617B
4856F4
866F76
D18260
8C3DED
081930
2B0888
6C7CF2
DA8210
9FEEC4
A7EFD8
CC9AD7
804995
E7D11B
5C3559
DD1721
1BE518
CDCB06
2A2F02
F79D2D
419A9F
B08ACF
DD978C
A36AA3
C7C40D
68F136