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:

E6EE85
CCF5D0
173874
DD15CE
AE1780
77255A
D8BF1A
C67248
E8B683
414BF9
1A11CF
887DAB
BDA2DA
8C6F3B
E4B13A
75856A
6B6531
139866
94336A
5E3E81
A62E13
F0243A
A1EF2D
052799
BF7D4E
0A32D3
A2B20A
FFD537
A04160
5A3ED8
17188C
34E528
6E18A3
63B0C8
A25396
B9D3F3
743D2C
911956
30D67C
52C158
3091D2
F84091
31C29B
A74FB7
3255F3
436EB5
6B5220
88B321
5E5849
C32F96
EACBF2
A0CB38
4BFA78
F456A6
5790B8
D02A30
3FEDDF
A3570F
EDF138
51666A
590A07
F424B8
CD28E9
E477C9
DBEE36
992B87
5B2F44
B6A5E7
8A1219
FA21D4
ACAA71
E9288F
0F290E
B0B252
881261
728465
CA406F
30512B
01D6F8
C0A9A1
CD09C4
B6B572
32D575
3D4847
91EEC5
069011
EBF4CD