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:

11A0E8
98DD70
0A6C24
451081
4B0FB2
41AD6B
E48246
2C461E
967464
A803B6
F2B3AB
A0BDF0
BF5D33
C8136A
3F2884
F035DC
8E5192
8B179B
4565B9
FA98D8
F3C086
A76819
57AF9C
925296
2A76E2
EFF190
975033
A157A1
AAC37E
6BA762
6259E1
0F0172
45916B
6FA575
B80110
D01A3B
486A0C
DE0488
DFC022
E1FA7B
4FF02E
0312C7
07A4BE
BA9B7D
6752B7
61B8CF
42F2C0
3E0C23
F731DF
6A7FE6
27C859
18F3C5
7DA095
F55101
CF7882
6E210C
AD84AA
6D7092
6029BC
29AEE2