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:

82F9AE
FAB679
FFA227
21C0AB
71709F
8AF07F
CD425C
401C4A
A05AA2
9B8778
4751F2
674D4D
03DA2D
006E91
FAF7B2
8B6A4D
50F56A
41C763
9F4DB9
2F2931
106D29
7B99A3
F64D75
D65B6A
9C27C1
2AB878
0A5B68
6FB059
77EBD9
6D77AC
729D34
5F1360
960B78
D8AE03
5CA3BF
35E09F
F1F785
6653AA
633D69
D0FAD9
823A68
131EE1
6C4DC4
54C0EF
1C017C
FB3F5B
3AA779
DFAE6A
24A820
8B034E
70519D
3971A5
8C5EC3
4B1FE4
D2EAA2
0A7E3C
C5C213
AB8B60
6FA7E2
199398
5A2AB4
0A9D5F