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:

2B8472
C34F57
756867
48CAE4
FC83A0
A34D76
BD62B3
95FE4A
0C7D4F
C76E65
E1292E
5D2636
7B51B2
B0E028
BBD409
FE5C8D
9111B7
4DCA8B
10CBFB
C2A356
003692
70C5F7
8DFA78
4A49C2
84DF49
B62E9F
5ADA1F
522138
BAD721
DE945A
DC43C2
1CA390
89DC8D
261C28
B447D3
FA6D8C
2D3596
438EE4
97EB7E
95D838
AE27EB
FADEEC
9BFD93
9F266D
8CC9F7
CCD67C
EAAD16
2F9CC6
A80572
8D19C7
B9F146
F91CE5
B283E3
B79E4A
0A9856
3386D5
46F73E
74F041
3B77DA
AF9CE7
7C48C2
AC79D2
FEFDDB
7BEA07
4480BB
213D54
191F01
98C62D
B509B4
759092
83199D
9B86BB
3C1049
AA8129
690BE1
B76138
C04E17
745AE5
964F1B
78E223
488ADE
BEEBE6
FCCF93
332437
EBFA71
3EB0E2
1FA32E
FD7AE4
59CC60