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:

B61F26
39F8C0
D6333C
58F3CC
95A42A
989693
7A9278
72BC39
3CBA69
06CB7C
8F4DD1
81E239
50160E
6EA357
F3D42D
A9112B
3675B6
5C901E
93286E
542FD1
18CAED
C84CD9
5A7030
2F6909
42C364
4EEE9A
CB16FD
898903
FFBA92
8CC293
E0DECF
A0DFE8
05EAB3
E1D324
C27F1F
46461E
FD4FD8
B06092
8B59A6
52EBBE
CF13CE
83CBB9
B5FDC6
E81D12
B5E35F
85DBF1
5D9C8E
E98261
28D2AE
C53ED8
DF047B
30C8ED
E1EE7F
291E14
9CEEFE
A02938
66870D
EEF71D
102F5B
1073AA
DEBD84
8C7424
B27287
71EA80
DB3F75
CC560F
C561B3
1D00F4
7F82A5
EA1EE6
7E7B18
E583D1
A3C102
3A84ED
70B363
B570B3
DCCBA0
A4A695
672F7B
CB0069
71B94E
B54B57
10995F
0C8A19
ED3A8E
43A629
40EC47
16D25C
3CE5F0
4DD5A9
1BB9B3
6AE7D4
DFD3C7
9FC736
D566BB
BE03E2
3BF199
18FF48
407DA0