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:

8E518B
50D106
7A9430
B90216
EBDC73
E86249
394C83
C79E74
BFC82F
6DA585
19B29E
D17361
123D41
5BE400
B94C39
EDD128
2DCC84
DC0699
B46AB7
D1481F
800DD4
A919C1
380B88
6BC1C2
EE5E6B
90D511
D4FFC0
11821D
815C3E
E40DDD
472407
7821A5
923286
040518
B0C159
39F7AE
02FB05
339E6F
F1123F
4AABF0
B4AA52
B49F9D
07A802
9388A9
0DC0E3
F19B52
AC622C
35CD17
55DE1A
C43AF3
48A76D
D69165
DB0871
BFF452
55EF64
61BCF4
D6B0C2
1DDE87