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:

013C11
A2CBEB
436FA3
95C161
24E291
7D6E47
C5758E
2B0D6C
B82906
B4D3DE
418E74
1BD19D
43501E
4F9D8B
CB8001
CF6B21
CC9107
D42051
E0A9BC
893621
63F983
9A3743
BEDD90
5FEE37
299561
48BCB2
CAE2D8
43F8A5
6DD21D
3AAC4F
DEF4D7
60E41B
F22653
1E2E44
420BFB
F681F8
BC6E2D
2709E3
F4BC61
25FCC8
F40D98
2652D5
D5E3D0
7B091B
084C2F
D42FB1
6602AD
0EDD7A
A00BA8
07EBE2
EE088E
46016E
91DF9B
AD7171
809CE4
12C050
747023
D4E6A6