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:

577831
0B892A
F2EE83
E5C3D4
5AB3BE
8A8B00
5A0D83
C8AE26
763780
5564B6
4A894E
8E0E74
1EE541
D779CC
5C9E90
E1867B
157A22
D67942
2860F4
7D639A
7FCBAD
F3D486
B8C4F7
8FDE42
63CE6F
B9FC30
C2C762
C741D0
EA864E
571688
0AC6FF
5954D8
5714C6
01D6A7
4356A1
6A1FCA
DF2810
E50EC6
AF5B4E
116F34
DC7C16
53F043
5C3DDE
64C2D6
D4E6F8
071CC1