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:

FEECC7
5533CB
E3EF31
946D9F
2BDA77
24D32A
BFE7D7
FA8B41
123405
DB64EB
D18D2B
7A6BC9
EFC31C
4D40F7
CA336F
377F52
86490F
F6B1C6
C3167B
3804C9
3D2BD7
70D5A5
BA8049
CE8838
1564DC
FD433F
634BFE
811062
B20036
B88A63
079F51
143EE7
A47E6B
A94776
9B109D
598D2D
0CC0EA
A96143
A30798
0BEE97
BD2870
D17D9E
BD2F6F
FA482B
E5D11A
E6E13F
23DB90
DE8897
933CFF
753B92
720D3E
15DCC3
8FCD96
D90670
BB6F46
15220A
148A59
1E5868
3CE0BC
A0E00F
FE6610
2635FA
291AAF
5C954C
231931
24226F
6823FC
4E8FB4
A1BC20
68D46C
71F6B0
3880E3
61608E
829E2B
265A10
E5A7D1
0C1548
433EBF
C58EFF
F90170
36D08D
9BAADD
E96710
43F5FB
3CE3FB
13CF4E
162C5A
922D50
A7BE4F
5BDFDE