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:

282DF8
58B986
2FADF0
E658D4
5884C2
124A4B
A0A9C1
37A78C
619721
0914A4
5D903A
2A986A
E179E3
6F8667
D0900E
8ABD58
9CFAA3
D8BB92
01870B
8545D0
A15AC5
857EF1
ED79BF
637FFA
48F54C
176BDB
0EF452
889344
9006B4
DAF831
07BEDE
FA8C26
D5CB4E
2C9D2C
8E72C0
815679
602DFD
7C669D
AED9A7
1AFD09
2B3169
CFA019
424201
E598C4
820E6F
6CBFF4
72BE3D
1CD130
AC1462
0F6F34
A986CD
7D4FB8
8AC33B
1CA2CA
432765
821D7D
267B0C
72F8FE
F507CF
F75B48
5B6492