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:

F7EA13
F6DFFF
A20175
AA4DAB
B1CDB0
69D284
B3033D
A3291E
6D8F05
18D9BF
A101CD
080908
213144
CC80E9
73C6C7
AEA6CF
4941E8
EEBDAA
3A8821
1EEFDD
0D91F9
019F1E
5669A9
F58FD7
826F88
EB771A
7C6BA1
657927
808F8B
562E65
ABEB21