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:

589D15
E3CCA5
CE9010
30A1E8
6D5B9D
702E15
EFEB5C
8F610B
F0C53E
515323
FDC702
A20571
1E315B
02F4DF
48F5E5
61A755
491D55
963EA7
291D8C
1D8661
4A2981
DC490C
1B7371
720ED2
E87DD9
8DB10E
10DE3E
BA457F
B61386
F821DB
28D914
99A73F
2EEE0A
BDA523
15F47E
33D97C
CA7827
74568B
96C1A5
E09120
84A2D2
1450B5
D0B20A
023317
FA066F
248B32
0D0858
B150CB
450B4E
04FE75
632CEB
3FC68B
96BB7E
1E166B
2736CD
81FF78
C9670A
E62D47
85E13B
A69DAB
228BAD
6DA083
DF7910
3B652F
233DFD
971F21
C3684D
4C4670
F6EF5A
15511E
AF65CB
4A1AF5
DCF7B4
9829F3
E92A29
217193
D58CBD
39C972
942D9F
C7FE78
BC75D0
94F011
C5F252
77F46D
3898BF