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:

6CF7BF
787BA6
D75692
8F6DAD
986429
7678D6
AD5EF2
BF4DEE
2C4023
2B555A
4360EF
767BB1
60997C
D38844
341BB3
4BA193
E490C0
7C1B63
0A755C
B48DD4
49F838
7517C8
069248
D6ACBF
1EB388
09B66F
172535
7E8931
D38EF4
6C8529
70BB18
025375
8C9DE7
35997C
8EC4A7
A8FDBD
AB2A07
EF292B
19B9FC
8C57C3
365116
945656
1BE8CE
FE5222
33AF73
1181A7
76285D
0D2D01
D4D1E6
366AC6
8C254B
7BD9D3
F34C5C
BDE31D
52C41A
7852C9
8EDDD7
61ACB2
D55624
1D24E3
7E02E6