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:

E7ED0C
77AB4F
84E2B0
2172CE
FAE4EC
1A4A5C
7BA1A3
E764D9
130D9C
26E211
DED833
938BEB
357190
3F3548
7C8321
EDF5FF
D456C4
97FADC
0F8C33
739CA4
9B1782
6AFD70
614813
27C9D4
CB4B12
07798F
7927AB
4047F1
2EA922
AC3A89
2BE748
2B0F83
15C944
060FC9
EDE84C
57C2AE
C305C4
79F81F
F7DEC7
0F0187
50CE65
9AC176
6C4132
2E00EF
2EF66C
45B9E1
46D26B
A9FB23
56B75A
689BFC
C21AA9
A49C94
3551D5
6E80C5
963922
1903D5
86DA54
21DFBF
9C98A5
781A8A
44D99B
58E433
19349B
DE5C72
0EB816
130255
690F84
BA61FE
7B0E11
FE98FA
68144C
923570
5FAFE2
646270
9990E1
F398B4
03549B
D457A9
4101A0
79C751
4B3B4A
C5F4DB
634062
FAC0B1
3A8615
05B9CF
CB4ABE
C6A186
F2E45A
566677
DDBC91
033216
2B2A55
1E9F10
A4E1C7
283844
7394E4
B39BC9
F8EC95