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:

7E5D25
AA6F81
F00FE7
349272
81A26F
FA7348
32A2E3
7DE9E2
007055
8C857C
B3C1BE
EE637D
D746FA
3F0779
00A8C7
6875EB
93AD4D
F35BB1
C0E01C
E675AB
69C9EA
903411
7FC464
49B617
262B84
69EB33
C40367
6C09D7
F1FB14
957CF8
924BE4
ECFCE6
311B5F
179BDB
CB8844
2C6A50
8CC9BE
E67604
BDEBD6
BAE8A3
0B7403
2AA3B2
D89537
6F7734
0049D8
00D785
A05157
AF8D85
66CADA
8C1E51
6E539D