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:

A743CD
911BE5
A924B6
A09D4D
00F3B9
5F84BC
097FFE
81D325
7C8103
710188
0E5D34
C9FF9F
A7D3CB
32ACCA
803F61
C50FD4
B5772F
60EC92
6FA689
F485F8
735C79
EE6BBF
7566D1
B7392E
B12D50
83651E
C000B1
F1D757
DBA101
3EA99C
F2D56F
24FA2D
E09DB1
DCEA39