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:

1765DC
011BEA
AE020E
70B01F
465C47
7D4D4C
7C63C1
9944A6
BFE980
11ABDB
B83BD0
E22288
EBFCF7
8A36BF
9ECEDA
8F9A66
A24DD7
1BA90F
D936DA
A76821
EE4670
979A03
9E39DC
944A42
0566ED
25C132
F33F6F
2C2ABC
0F31C7
9532A7
5CE8CF
915AD2
617D8D
266216
DE94A1
46F4B1
CF91A6
77E0AB
2A06AE
692DC4
1213B7
C06EB3
951362
95F26A
899E1E
CEC30A
DCBC71
21FFE7
5ADA5F