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:

91F650
141D29
1655D6
32D20E
4F5100
4D6531
0B2332
15964F
632BC8
E83392
818E2E
CBA68D
AE70A9
116419
46F950
296A57
AC76DB
029D7C
31012F
A69CB6
BADF2F
8D3A97
F1710B
7A87E3
5233D3
5F0D90
D9E12E
C95446
2D833A
C38706
F039BA
E2D305
EE8394
FC49C9
56372F
64D58A
360F7B
F0953B
865A04
06A22E
1CCDF2
A0AC43
25BD26
5C3174
70B82D
8710E4
DC850E
CD1AC0
F0175B
84EE8F
154EDE
4AB420
3A34A2
0592F1
0D6750
6C0CC8
B9216E
558FD4
8270B8
DD50C0
DABD93
5B8979
059736
FFFDC4
A1282B
C65222
53F839
EEF703
4386B3
AC60E1
59798C
5385AB
47E3E4
AA9DBE
282F7F
338D1A
4D1AF3
121879
B2AFDF
C0EC8D
49A3C5
CC9659
659FD4
455C1F
9ED4A4
C831CE
AC1029
B8B226
A76CFF
C1A1CE
C8324E
D85CB3
2B5B20
39605C
F82448
C23945
EBADFC
C315A3