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:

BC1AF1
15CC88
019A3B
952D9A
010402
EFBEA4
05932A
C75115
2BB46C
82D9B9
0416CD
A58F08
40A825
0D4B06
1E4974
FB9E71
83FC4D
57C15A
85D2B1
6F3E3C
26E3B1
514846
419936
CEBBEE
7C8701
E81C1E
C392E0
CA1E63
AC56CA
B5F8F3
FD87E9
A5B141
217F39
8880F4
9745DE
B9EE7B
64F184
87DFA2
E1AB99
0FB2B1
3FE193
CAADE4