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:

55F990
B67965
67F964
80943E
1FA984
18CAB9
596BF9
F818C3
72E454
BEF857
28A778
FE68C9
90A3B3
43CD13
36F677
55F3CC
A2B04C
E61A67
5AA45C
FC0F21
A21CF1
4FBB08
317345
3E47DC
AF054E
152F1C
1D806A
B2BF27
E30DF5
8E6DAC
65324E
2E1FC3
F809CE
1097D9
24FB4B
91E099
656392
B13C34
73D083
EAD79B
AC04E6
A9C9B8
ACFE60
14D5B6
8EE16D
BE8126
913E9B
B7689D
A81EF6
B43FDF
D53CD1
D32BB8
0BB6C6
538AD4
AD48B7
111AF2
6D21E1
38C2EC
BF40C4
9F2CBD
638AD9
59394A
FEA823
1E4F0A
AB71B2
EB7A2B
E743D2
3DB696
51C886
5BA946
DEC1C5
FFB1B9
C4B3FF
BF6A86
6BFABF
40DA87
D5CA26
ED7C2E
1BB565
54325C
7237B1
CAC436
A97B18
63A5B2
190C4E