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:

C92299
6F7CD3
22ADF8
B160B7
B8E8B6
EE8BA6
1E8898
3037AF
9EE6AD
0C1EE7
E3E756
F9B0F1
ABA3C4
A9401D
964808
56CFAE
17F1B5
9246A5
9FD68A
422968
271F5B
0CEAE9
502A76
DA17C4
419546
E642DE
EF4684
1AFD25
DB80B0
2B3CF4
9C98F5
C02F3E
D46FE6
5CC7CA
9F7249
6F6AE6
5CE291
4593F7
C385B5
1A3399
1A1CE2
F62DE1
54EBC1
79A0CE
A9741C
062F96
9C9492
03146E
0513D1
673F80
779924
A4B81E
A71B93
47C460
6A1802
322BEB
A432B1
2BCEB5
C807D0
A96A5E
98C209
712468
492F44
A7777D
BF6D10
0B8C9A
3AE6F4
776DC8
A82B9B
F76F68
4719EB
5175C0
61D6CE
7BA802
ABC2A8
22D38D
05EAB0
EEC665
C89875
834125
E43888
7E4B9F
FAFACF
6A946C
1E8E5D
411C20
B00F80
6C2E77
DAC820
371025
676FD0
F4387E