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:

4C0CA7
7CC5C0
7759BB
035119
08D125
B5C5D8
56B1A1
CF7EE0
D23904
D63688
79AD35
5033B3
C1F174
601703
BB14C0
5EFC45
378EC9
6180F7
5C67B4
CA399E
5EF30A
65851A
057AC1
DA19C6
8D1AB1
AC6537
63048A
F9AEC2
08A5C5
DAA365
817D8D
52E732
419ED5
B88226
D3ECE2
C46D4B
3D853D
85E391
C9A49A
DC55C5
1D8AA7
3405AB
845AC9
B44B97
64EBC8
B04F25
3A3049
263C78
66EC24
509075
B99E3F
9EA3B6
FB510B
498AAF
F045E8
ECE70A
66E59A
011402
9C0BC8
17F011
3BF846
B592C9
4F6597
D4FFCB
B60690
00C5FD
F94B51
C0F988
F0B741
CD752C
DBC5B9
76E007
F32FCA
B4509C