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:

13305C
6FBB38
B687AC
D70824
924CC7
314588
8D4893
413089
A9D7A5
5FFA18
A2C8DB
80395E
CB3360
5D8205
939182
F32AF9
1008B4
B9C036
07C5DB
823FA6
83BEC5
A7C986
DDE852
6F10F4
1DB6DA
5772E7
607F9A
787699
815BDB
FD0501
DD6B2D
B7F867
1C3D0B
7DF821
092EA8
068A77
39A159
A0488F
20C042
E778AB
69C645
C44FCC
6AB444
0BD9E4
B3BB62
6AB1E1
FA4E76
897B16
45DA24
06BF93
6C4C21
9EC0FB
452167
202982
3344C7
93C7CA
22DB29
2D0694
684FCF
D6766B
7A4D3E
D47AD7
94B869
EB1358
262A9B
F97FD8