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:

69315E
BE4FE4
E87699
7772D8
BD45B7
C70793
D8D6D1
D2D22D
DC8FBC
A6AA2A
E0D949
BEE430
4A858D
F1899E
4DD99C
C2126F
B30C0A
D60CA6
56EF01
2BA4EB
DF377C
11F6CF
648FD8
82F5F0
A507B5
5FBBA8
BA6030
9CC4EC
D8F8AF
80B64D
D17515
5E0858
BF8B24
05EDED
ABAF90
B5E8C2
E3F1EA
590573
34B38B
6BC50A
68A953
8A2E6F
463F57
0CC741
64D122
F59CD3
D03B98
5B893D
AAE0EE
C8DD5B
EDDAA5
FD0023
92104D
DE5A83
675713
F67CB6
28C9B3
0009EE
21D6C6
E64C08
0219A5
087B2A
1C4880
8FCF69
96B758
D9415F
F1E473
1E3A37
374BD7
316832
3234CD
7C40A9
73DDD2
E3B320
9497AA
44A255
9FE23C
20837E
E8ED14
E03815
1351B2
17EB97