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:

A152CA
18CA82
A4C531
0B0BE3
98D5BD
E416C9
F0E86B
43587C
430FA9
82BEBB
06D27C
31E8F9
5DC235
F49066
9A5BCB
72CB9F
6F6035
29D372
91B915
8FA828
FB2094
BAD5BA
6F842B
D70906
3A0569
E5FF19
F7825C
FF1811
140E5B
9ED6D2
A65039
06289A
EC4F18
C89247
126822
53FE1F
911F54
81382A
0051BD
4AAC3E
5BB5DF
D47616
162D22
0BFB21
51EC7C
AE9338
228F26
0CC6A3
D52C3D
7BDC7B
C34D85
5A5D2D
4FDA4C
3AEEEB
C27418
C7CAB3
FD87D0
C0BD69
0A1429
08B851
F29050
92B220
D906F9
20B6A5
170997
CC60D0
DAABE0
4903AB
8AAD99
AB7252
7512DF
B8A3CE
2BC048
2C0982
E6AC10
2ABBA9
C80C35
BC717A
0AF5A4
314C30
474E35
E6618D
354859
C6F1D8
FF50A2
189DF9
E3DA53
04E111
3DE5D8
85A179
566E41
AF01D7