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:

3FC26C
F10C3A
FE75C8
E2CDE7
4FCB6F
C7760E
E78BAA
8AAAF5
F5C736
470F07
E9CAEE
F9D75E
025759
9B4FC5
DC1280
FF9AE6
247135
B985A0
7CF5F4
7BCD6F
C8994D
8B9279
20378D
AEEA8E
C338FB
EC7CD0
A57E95
C5253C
A7E901
A1BD9A
2ADA79
1691A3
2081E0
B390EF
25C065
2156F0
765F36
29AFD1
21743D
4D12EE
9988B4
4B8086
960886
64F7E6
4243E3
C7722B
23713B
3223B8
7F0DF3
B91DD2
4BC982
4EF66F
AA8379
323275
C30A06
C0D1FC
0ECF2D
A94A2B
7BF3DF
E77255
176C35
146B34
5E0675
E06511
B1FEF4
30E643
B6465E
5DE71F
E68704
5B47BC
EF6B8E
7E6295
10A76F
492E39
8C45E9
7C2041
F12702
F1D865
857010
F82B7F
0DFB74
C43761
3C1396
8085BC
66A029
5EAD2B
F7D957
B9B849
F8C9F9
680BBC
E6E57C
1E880E
161790
0AAAB2
A5B61E
33A7FF
4311E9
71A6A6
B54C12
47024C