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:

CE9D1A
9F6476
7474A6
9B94F7
57BAAE
A1709B
E326FA
491555
68F7EC
CA1AF9
145941
780C88
529A62
E9198D
7462B0
CDAF14
C89133
4DFB3D
9C576A
7D7D20
B5C1CE
D7590B
904469
2E012F
6FC953
D55CE8
799F57
EC9C96
080484
A1B7A8
B88C8D
3561A9
A23510
C32455
BFD2A1
297B3C
2BCD91
4D0B3F
788848
99517A
D51F7A
442C43
7092F6
F12585
3B93C7
98725D
95F3D3
84501E
BFA9CF
4556D1
E20044
BE49FB
244178
1D699C
B421F1
8AC2AC
AAD9EC
8346DE
4B3240
A3A942
1A4DF6
CCE01D
8972B6
551147
299098
092A04
C07559
B0735A
305EB8
45FDDE
42DE77