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:

7BFF2D
7AFDD0
0CC7C7
EAC0DB
8D4FBF
7A87C2
B8817F
94370F
AC273C
759281
5A13F5
934B36
BA3A39
E4A9AC
0E4E9F
71DC71
DEEFC3
E279D9
46F71A
44392F
79B767
884505
31E9D6
097A46
CCC736
7F600C
30005C
135A0E
CC914F
CC89CC
2D569C
4F098A
899645
86B5CB
F2C2CC
20F960
AF99FC
A15862
7870E5
105AED
8690A5
871673
FD4A6B
793DF7
76F7B4
723E1E
380CE0
9D8DF8
77B8FC