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:

D112D7
E7A2C2
1B98A1
8B0155
461CFF
51CA30
731D31
C90398
B959AC
7B8F4A
774C35
683E29
B07E00
429174
E1B6F7
C6B4F1
83CFDE
11C156
8C4D86
57BF33
C4AE7B
D2C78C
F3A2EA
92F765
67155E
91B245
EDE5B1
248BA4
EFDAAC
CB69E8
93B103
D85846
891E9D
1E6E71
4849A4
44493B
FA4766
CE99F7
B85E1F
C231CD
81F465
B5A476
3F1EDB
23FA72
36DFE4
77BEE2
9C7975
2F6F68
D2C293
9C19BE
F14011