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:

EC983B
DFEC04
886367
52A738
235417
B83CC5
309FD0
762721
3D847A
072B69
BBD02A
8CFC89
3577C4
97BD16
BAE9C3
165C7C
57883F
0FDB4A
69DEC6
AA704C
D55C97
30D2A6
5BF088
AF24CA
86914C
ADD85B
FC732D
5A9209
7DF493
488D32
3C8704
DB5B63
83492A
A90B58
0271D6
937A9F
9868A1
FC56BE
8758C0
76949E
0E8309
1CEA23
39D18F
BD206E
087A08
537439
DD182E
3DAB1F
EE6576
6A8343
FB0097