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:

C02381
188915
6E6A5A
FAA3D8
DBA451
DB2E50
5B13C0
D7395C
FA41BC
D92ECB
007466
C1D462
976AB9
FB4264
E130B0
362B46
9EB9E3
726E95
1930F8
6B5390
F99747
C9BBE1
206B1D
952546
85B5FD
936F06
597B5B
D7E825
4E58D8
73C8E4
2138C1
D5FBB8
C6DA87
F65370
27275E
F48FE5
073459
944301
3BABC9
96771D
97E7FD
D8F828
5368B8
B8E58F
3279DF
0B2E31
6515AA
ECE3C8
6A8BD0
F65204
65B344
D25603
2E99BE
DC065D
47206F
7DA172
B213E2
CD0286
DBAD4F
E6FDE4
19FD54
82CCA5