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:

5CE2CC
F3B42F
96A387
495D97
3E80CE
2D7135
9369A2
350FCB
A3C532
535430
28000D
74AC71
82C2C5
798E6C
37D2D3
BB74A1
923826
C3F7FB
DFE1B1
9DDEDC
DD0EBE
E6A584
F2E6F7
C42844
18BEEA
6F6694
3AF359
1DC42F
2D9827
B706BA
7E2FB1
EA6811
991BBB
7EAA09
D3561C
DAC797
25234E
1E333D
48C0F4
868F60
6A1712
5B1229
0DB837
22A966
1ECD4C
E001ED
74C794