Gradient Link or two coloured link

This example is now obsolete. Here is a MultiColoredLink class that implements support for a variable number of colors, new for v2.1.24:
Multi-color Links

The Link template in that sample will work with up to 5 colors, but you can change the template to have as many or as few colors as you need.