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:

805D8C
E92898
0B7F18
F84E25
75AFC5
E179F6
F802EC
D934B2
8163F0
FF4A96
8FFBEF
5A81EC
E55D76
93760E
50F1B8
0FCF4E
05E5BD
F94CA8
FEE8CD
DBDB43
516759
634D5E
0162A4
A1F314
162638
162DA0
554416
D73906
E7D7D7
326F05
43CAF5
0E5DB1
FD9BCD
D27889
442735
14C810
5AADBE
9C84A1
43AF9C
43529B
BB4ABC
73054C
3D5CED
5E4C7E
7EF5DC
E663C9
ABFA72
6BC9F9
A8D050
D57512
CB796F
96B18C
B182C3
C2D746
CE801F
C28221
7F7D93
B2A1EC
CFFEB8
F429A6
8DDE3D
2CAA11
3368D9
325C3A
3EA57E
AD7968
28BA7C
CC4773
C7ACB9
7F630D
8AF2E7
655E68
CB589B
76634F
AE91D4
DEFA53