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:

9AE8F3
41FC93
86BCD3
6B7868
D3DA9C
42312F
E24EDD
056ADC
5FDC27
C7830D
83F9B9
478586
AF623F
28BBE3
B25D58
26861E
B67504
EA7798
8CEA8B
00DEC5
3DF3BD
952610
C685B2
FCFCF7
19A71B
3F37F1
45EADD
641E39
65BCC0
B06472
204C09
C7F95B
75E7D5
73FCB7
79425F
CC1A72
BC1B71
23DF04
BA5C27
F8967F
1F8DE0
4E03D4
B3AF50
23639B
FBA933
35276F
346200
F681BE
BA1FBD
E7E8DC
D3EDD8
F4AB0C
B1597A
452427
797D8D
874D60
994ABB
37B022
8D4A4E
596F30
487521
67E657
B134F2
77E9C8
F0EE41
6C6584
F2DCBA
84036D
B0E3C7