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:

87BCB7
ACEB83
B15489
FCECB2
192364
9B437C
FA0D9B
9C8F1C
77EE89
1D3E13
D4B91E
D9324A
A24276
EF6BDC
5F0930
A375CE
11A5A2
FF5C34
B83B90
877E9C
3C4169
38AF57
64B6A6
FDFAB6
C96E64
1736ED
C2F0D5
8931BF
C7A208
94CDE4
FB8045
403888
5A6B02
64357C
E5EB02
0AD6B3
A5157A
8F4DBA
E87E62
6937C5
301915
AE840D
2A35DB
F8E3DF
C7C88F
72553E
91ACBE
26D429
614452
7B662E
F3AF7B
1D80D7
2C1C70
0D4249
A5D056
BD386C
EA2416
4206E5
504AE0
20BC7D
0AEE16
70F86E
D81755
371F76
10C22D
0893EA
FE06A2
CD8997
D3539A
8653A1
29931D
D26662
2B50D8
3A8817
3CEC5F
2AAA3D
DB5CFC
2F30E2
AA3632
0344A0
E0CE90
CF6492
0601D7