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:

4B514A
EB6C0A
D12B2C
A0E189
D364E3
ABD2C6
AC13BB
F8FA5D
021646
505CB8
E284E6
F9C3A6
875B88
9BD82B
C2A21F
1A013A
549B7C
9C2A35
292B13
912617
4CF8A9
01829B
C16504
C267D0
308135
B63C40
4F4589
F81CB1
90FAD8
4CAC0C
8C93FC
066432
C310FE
5F1A23
F72076
A1BCC3
D00773