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:

0C2320
C24135
30AF7C
75534B
270B11
07C623
7605B3
FEE6E0
7D5CDC
1A82CB
B57E3D
B4FD42
D5413D
944D24
8BD5AF
715023
FE4A95
D92517
343612
2DC12C
F838CC
1E1E2F
70A488
870A35
94A2C1
E16D6C
20A9F8
3FA15D
51A75E
DB26EA
2017EA
4835B8
E0505C
38C71D
EBBD89