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:

D36CD5
8D2556
0B4F54
3C30FF
CEC87F
90B7C7
84C6F0
1BE0B6
D35BC7
2B2E1D
6ED021
AF9776
4D0887
ED222F
B6D822
8A7401
B6D35B
B44979
470236
65EB76
7B5969
DD1415
548EF2
1DF316
803DE3
C2ADBE
F514BB
8B8731
D2DA89
5D9F9C
EE3DDA
980A0B
ADCD0D
D950B4
79F426
F85BE7
4BA210
E5FB42
923CCB
153D3F
ECBAAE
0187CF
FB343A
FF4B2D
F45881
E9C097
CEF807
B8C1F3
98A099
EE328F
666E54
758082
E0FEE6
8FE214
FA3E56
E10B65
72BB29
043DEC
67AC7C
382A66
F9AA44
9A50E6
1ED5D5
2D9EBE
AEABC5
482502
572E9E
B776EF
407AD6
CDF061
A87E71
CBE4E2
FDB12B
55C70B
96A7BD
EDD893
BCD46C
022690
844DCA
BE9F54
E5D198
260A90
8DF9B0
AD71C7
97A7C9
817306
17CDFC
8A994E
EBB367
151A3B
F4FA6E