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:

541DE4
F0D617
73AC34
F56D64
DCE182
075552
8FDC01
B94A1C
22F3F0
5DCD38
A25864
48AE3D
DCBF81
7C2769
8244CE
5CC4F9
D50E3B
A7CDAB
635A4A
9C237C
B2A7E4
6C183F
DDCF48
AB1685
E921AC
3B7BB9
D99F8B
8099CB
7A16BE
A60848
D74F94
945CE3
4D3677
479E49
FED45E
5C270E
20E4DD
C4DBD7
2602F7
000F96
860DFE
26387D
FC788C
4BF84A
FD2474
3F330F
2FF14B
ABD31E
656C2E
E3190C
2210ED
B99BDD
EFC74E
DBE998
D6CB6D
340A1B
EA1C61
18A2E3
06CB14
992146
7B8FD6
74DF8F
66AC0E
5D4A41
64B362