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:

3C7F5E
D7D4AF
B49429
FC9326
87C4FD
6B6402
4DA752
A13656
19DC46
5AFCC8
E70341
1B4FB9
646081
90CDAF
743803
508BBE
92B5E3
A7B4F1
0CEED2
699E09
658446
527393
3F2451
4BFBEE
7D04AA
0A3F51
B6B31F
AD1DB2
F43E7C
D12C04
83C6DA
AFA788
9E5884
46BE9A
26B98D
D3EDA4
A8A3F7
4EF922
E92C62
D5B8FD
BB53BA
7CD5B3
244E87
81382C
27B740
11DAF6
CD8022
2DF088
630F44
F2A4E9
669527
E10FE2
B7CA9E
63470C
0C0A91
68004A
B6B7CC
365B1C
DED388
57F987
4DB18D
F415D4
1A2733
93DCCD
D7D79C
1EFEF5
AD900A
9CBC1C
F41CB1
12CEF5
C47A01
7411D7
B6B580
783D0E
4551BF
F8C993
D145FC
893A71
8CAF6F
E9BAE7
3ED0C5
A905D2
84C4CA
9001E6
7D3238
F78267