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:

795708
0EA5AD
234E17
EE3D03
E8E119
7EFC4A
C5497C
516CBB
9C8BAE
2E6126
4B3008
DB3FC4
7CD4FB
41101C
AD6705
DECE36
972F18
CA063E
5C873A
74F165
403B94
F3EB56
5E3B05
A88DDF
564958
65A326
8D8736
1355C7
BD7BF3
A3F898
9CA97E
064C9A
7DE3F4
5BDD5A
921A4B
3F8522
5BD7E2
0D5B41
151509
AA6CB8
9FA644
85566B
F19494
C49867
ACB0F9
7E9B70
2E36D6
940B98
7CFE7C
9AF18E
FE9E07
D3CD6B
BDB9C9
B7D735
92B473
462119
C2C96A
22E0E0
CE1FCC
AA0274
91D071
444420
D3EE26
421F15
44AEC7
921E8D
216573
A961B8
477664
11D941
2C0780
3F3639
BB39DD
F851F4
5309E1
CFBA51
B67D32
BBCB0B
4CEC5B
373B91
43ECBD
62975C
8001ED
F63C7C
0A3943
924036
D0F042
778CDB
754050
7CA585
149830