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:

2C272D
77A9AF
DAC36D
0C9EB2
BBF2BF
2D6078
2B3ED5
7744A0
A05395
F22DB1
899247
E79101
578A2B
83155E
5A2927
C1C438
B66F7A
701953
3433BA
6C5D27
A49B50
C23D26
F63AE3
647799
B6024F
E8A386
E7C8FC
6017A4
0CC61B
363658
5361CC
0F79E9
A99787
A37082
6C3DD7
31E5DD
F4E9D2
9FC60A
18B739
1E1B04
D8D035
716A19
A30C6B
38517D
A77A5D
A91C92
16CDD6
5F4422
2594C8
12C8B4
1DE305
A06CE4