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:

B0E790
CE14CF
B9B582
D84D0E
29B47F
176C7B
E366F8
8E0447
CF12E9
654A38
46648A
23B39E
180BB3
3B3022
DF70E5
DB75E4
A7B58F
BB9FC2
13224E
5C7271
2A2081
DEDBA9
E3A9D7
D42F05
F0F75F
1651A2
DB9065
32D60A
0A573A
EE1595
287D29
FF6E62
4BC5A2
E0A254
30718D
463643
E71750
77F329
2BCB4E
0E60E4
9D9176
DEF754
DCCAE3
C159DF
C15EE5
DF8733
8CDE80
831C17
414A78
ACC902
7F6FAC
0077CF
08D164
9EFF65
53D811
8BEB99
D988D1
806349
2CF5FE
6F8B64
3602BE
F434B2
FCD2BF
4B9E8F
7A01A8
BCDD51
772A58
CB54C3
BBD4DA
BAF23B
B9D839
D71C3F
4AD6BF
E8DB62
5498CE
4A4215
33E0ED
DF35D5