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:

2A4EA7
8AF4D2
8C04C3
ECE93C
CAE579
5A2111
425EF7
6D43E1
17E69B
A4439A
EEB072
C74AA6
3D66DF
942474
C02783
FE23C0
261127
F16DAE
D6CD5D
66EE15
7D9F48
961C26
B6A7C7
8B6357
29B4DE
5FD3C7
A6E584
75CA0D
148E31
CA89DA
927867
E9A45B
59D19A
F74B78
8E0A3A
8CE84B
A251EF
140CBC
000DC5
C07855
403244
30BC72
940510
2AE0F7
1E7CB2
AAF3AD
9D0D39
C39D9C
EE22DB
FAEE16
D7DED0
57D5DE
E058AE
7E1788
5E76C7
31B642
98BAB4
391EFA
E7C2A3
A3ED2D
1A503E
A926F0
E7082D
DFDA04
98F9AC
BF96F1
775A24
B65BAF
665D31
CD7EB1
E68446
334020
1510F6
EF82E9
59DB63
FE0B84
1A9E93