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:

32EA58
DDFEF0
38C96D
B4429F
C8BB2D
C294A9
815DDC
5CA50A
14F825
EA0AB1
B321C0
C8C69B
5A2B86
075A9F
90BE04
FE6ADB
6745D6
22C118
22FBD8
602540
579CA5
1997CB
C60FE5
C5AA04
A9A962
A814C9
111C10
F03890
872A6D
CE75FB
101245
439E4A
469768
6EDB4B
F87C91
CFFB5C
79F3C3
0BBD3E
38CEB8
502BF2
C95F2C
9CF040
A8167B
330E19
D920F9
95B09A
680086
B248B3
4DE81E
331518
83458F
BF6B8D
9D32EC
37727B
05E508
77F9C0
3B9E80
AC82CA
E19EC7
E1CDBD
A36EC0
C852DB
EDE6B1
F9875D
82A55A
B1A18A
A0C740
78BB33
6744EF
4503B3
8ED4CA
1BBBC5
E91E90
388BA7
D37878