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:

60E82D
4EE0A4
14C54A
7E7C53
73A217
D80014
51F336
DA72CA
2E67E1
8BCB92
4C5EBE
E9DFB7
65448B
D8AB4D
71752B
31D35A
EDE586
32AAA0
980017
626F4F
34F3BF
B32733
1762A9
DF2756
134C4D
916E1D
2AE678
C408D2
AF3F16
6A8B0F
779830
9C5BAF
280B87
C67852
220A96
609663
801C92
EA099B
F6B1D6
5C0DD1
655F4A
253888
ECA565
2F2569
0D10E4
56B111
191990
5E34E2
1B00C3
F6EBFF
785E0A
5BDCF0
461C6C
C83A81
D75F6E
2C4522
D0E25B
86D996
0C5B1C
4C5A86
23A499