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:

3ED95D
222BAB
6905FF
D7247C
4AAA03
D8A74D
D46B7D
7D209D
87DD0C
44CAC6
873097
9FD81D
C5AE92
7F2853
C9F7F9
D7C577
9B89A0
A6FCB4
3A2FB2
9F0001
188BAE
16AB80
F18F11
1AB66E
5C3363
D9345D
A3C06B
EDD678
47F967
D4E6A3
C56D97
C0FEA9
B236F0
7BC195
15FD12
BC84F8
0FDDD8
8608C4
13F444
1CA4A3
097542
829D45
5BE2A3
9647E9
477B18
1B4924
258E2C
F115DA
5D7E65
05625F
4BBED1
D8F3AA
990438
CB71D9
6AB1AC
2AB7F0
A161ED
E18B24
6DD180
A9346D
44B659
516B3B
695768
F5F9CA
864017
72E32F
721BAF
65BF72
A2A197
2F44BF
3A946C
61B6C1
18F56F
A07A13
68B78F
4602B6
41FDA5
3332BB
3EDD10
F7530A
392C98
DA2D36
85A235
4A0A0A
8EFCDA
3A26EE
EAC09D
B1A958
7C59B3