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:

875D9E
E53741
36B9A5
152FED
BB2B8E
4FEB81
6D258A
743CE1
7AF6E5
F26ECB
D2E1D1
2DA056
43A8F8
1F8328
E7801D
1324EB
D91FEE
4A4444
11CCD2
DA944C
5BA362
07A974
F32FB2
21FA53
64D8FD
9E552A
9E5172
EBF776
18CFF5
06A0CD
2AC4C8
257B99
033B9F
15F9E3
0C5B06
C728B9
F43809
4EB227
12FAEB
1DCC65
566C8A
82799F
9CDEC4
451973
2541E4
88AC4B
A7DAA1
EFD9BB
0D6B88
BA235F
AEB475
9AACB9
0AE02A
29C43B
34CBA7
B7C012
340AD3
D5AD02
93798E
5AE4A2
8B7F42
8C6224
2758C3