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:

CE9B27
FF1178
F30092
7D7865
C0DC92
E2A679
533608
2F8EFA
401702
62F09A
05EF11
E3521B
1AE2EE
AD21D2
8488A4
76FBB9
6A9245
4CA5AD
83D706
3F35E7
F35C9C
D223A1
5D3B6E
064DC6
A8383A
46DFC4
00AB31
6C26EE
820830
A5285C
5A36FE
C2117E
F81217
7752B5
5FF837
D79CD3
BCCA58
FA75EE
29C743
5802AA
84CC1B
4B4F88
3E587B
CCCA7C