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:

5430CB
1AC7D9
E3F294
9071F6
0D1177
B5DF1C
ACD9E5
0EEC6C
D6E472
185DDC
BFD071
3B95CB
AD5E48
1139C9
C6B3D6
035301
193468
59271B
BC4774
CEAEDD
54568B
FD3215
A32023
A2FBE6
7FD977
5B7B89
F30BCD
6237FB
474705
231374
6A956F
0838E9
57C2E9
4EF321
943B11
8FC20B
B550C0
F18F04
0CE916
F078AC
88FA57
3A7E8F
75FC08
F57716
69A137
9B1BFC
2724FC
481176
DA8E44
593D54
807074
B6C283
95BC03
0F9218
5B6B62
C1F297
C7142C
5E24FE
E87228