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:

CD56C0
C33F88
BC47AD
31916E
155F7C
2DC164
DB8C43
68F1E5
EDAD34
4C3015
A61E9A
14088A
33E8A2
ABC962
56F615
67D51A
998561
AD2F08
E4C670
995C22
1A7904
928055
EF4141
9908E6
6DA417
482B45
554F3C
B15092
CEFDCB
FDD1EA
557369
8506FE
FD5D9B
903CA3
26DC26
CC5287
FE41AC
2A5F5A
33C218
27BE1A
F4EC97
A80F9A
287D14
BBCA95
7C076F
7C0010
41A54B
78DC23
66B84C
CED36A
111914
B91377
70A3BF
59C76A
18C2A8
AB84E4
CFFF12
CC7676
9B083B
C577F0
75C1CC
FCFA3F
679050
F73D05
898EBC
761090
1E0423
C91F76
3AE254
2C4C71
1E7DC5
91DCA2
0DC8AE
266D35
C74C02