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:

FB5E03
94655A
3F8CFF
E05029
0E2052
A9D226
D90DFC
73DF82
E3A053
739CAF
7AD012
27817B
953934
23FEBE
C94A5D
D64BCD
8080A8
C0B04A
E1F515
AA9DF4
3D12A5
8FED13
9F40A5
16AE9C
3DC688
7C1887
CB9EEB
2B6BC0
9564E8
B6484F
56A58B
964CD0
298A91
E0B984
B1ACB8
C7205A
97D45A
9A3521
0628C8
C8242E
1760DC
D00A94
D409D6
624B58
1BF416
086833
6E7DEE
341FC6
C94246
4866A3
602995
F02D77
1CC261
41E0FA
343FE3
785D1E
F5A243
6DCE70
5099FC
D41209
A912A7
930442
C2BF2E
B77FE4
638428
D7EE68
3D1047
F234CA
D8D0E4
58D932
14AE37
1CAF3C
C4A9F4
7F4FD5
2CEA78
EE3C76
9725F5
38236F
B79163
75EFC5
928EBE
E9F607
5B8E67
074855
205EA9
82FDC5
41811F
9FDF96
2D031B
0636A7