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:

B7FC1F
7B1E90
B9AFDD
9F1FC5
F41874
896EB9
609933
98E9F6
F68A79
F7CE61
793022
638DAB
55642A
B2EC68
9BAF25
3ED133
1625CA
1FFCC2
C90B9F
C7B78C
126CDB
E015E4
4531EB
7B0EC1
E6A31D
12A0B7
9BDF04
0D4BC0
1EA763
9828A7
91A463
6B8265
7444A3
ACA303
54143C
5ED881
3E8893
BB66B8
FA8541
68237E
1706BC
3D434C
46592B
9A155D
BB19A6
8548B7
3DC6EE
415500
B766AF
36AC35
E76E2C
F32C98
9F7777
69423E
5D6679
8206E2
92484E
0A7DBE
7B57B0
3A6A08
3E0BBF
B96F9B
D916D9