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:

D2CDEA
4448CF
6BECC3
C5D6B4
9AAD67
EA7B05
5F827D
AAAC02
C138A5
881D92
F88BAD
11BE12
F5740A
63DE69
20E97D
537596
E4C4B6
92F69B
1221A0
A28645
B5E902
17942C
45EFA1
3FAC5A
66AABA
3B91DA
067C9A
30D703
FBB4E5
23555F
4BD74A
FE074C
0DF305
CDD6DC
CC33F7
443C7A
EFE31A
1199A9
FA0BF7
5D8F4B
862D79
3CE02E
B87A04
EB80AF
F7CD5D
CB91C2
A8C074
53F2CD
BF96BA
3C5D2B
509484
2FA151
750596
EC13A2
2DD17B
A53EB1
32A8B4
A2FC39
0871BB
812ED8
342580