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:

AAC663
24DCDA
F7CF47
CE5A4D
747E3E
A202F8
A225A0
12A54B
B2AF68
A53D1A
0C40BC
67BA1C
E5DBAB
049E4C
471A20
E34120
0A4356
55501B
A121CE
6CB1E8
C8E048
3D9D28
DAF16B
AC7327
8C0C31
152766
8FC913
3DD750
65EF3C
5AA923
BBAD69
534E3C
A0F44E
E7B8D1
4A1724
2C48FE
F87C13
C984E8
DB4E69
16BC42
9E00DE
DED7D9
DE0AE7
96D2D0
6A24FD
632EC8
91BDFC
9D17C6
31D03F
3DF184
1A778D
B8FCA0
CA024A
72BB6D
AFD164
498B2B
722AA8
34ADEA
4AAC34
D92232
7CA311
8EC31D
F908B3
04E121