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:

F1A73E
F52345
B2337A
538F41
AA41C4
3D4537
DCF9BA
736048
EBDCD4
16AFB4
A12258
716780
BBBFB3
268377
DAEB1A
0744BA
813B0B
D636A2
15DAA8
6D8A1C
A7DB79
81623A
C81AF0
0F5087
F37B16
67B7EA
65FDC8
C32C40
81F273
259795
94A12D
3BC75B
0C6F1D
FB3F89
9777CB
A9A388
584B19
F6626D
595CC3
BD6528
AE6703
8CA3B6
8C5D0C
44434D
657486
2123CE
789FAE
48CCAB
491316
5DC1BC
5D5530
57DBB1
8AFAD3
62C0BD
1BEC1C
F7A9B0
344406
61C80C
3706DD
EF7EF2
1DB15E
B5A99A
0BEAD1
0AFD06
2B9FF9
36FD4B
EF94E2
C11F2F
FB1274
39768E
F2E84B