As an alternative to rendering a raster image, you can embed a SVG file:
<a><img src="http://dump.thecybershadow.net/6c736bfd11ded8cdc5e2bda009a6694a/colortext.svg"/></a>
You can then add color text to the SVG file as usual:
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100" height="50"
>
<text font-size="16" x="10" y="20">
<tspan fill="red">Hello</tspan>,
<tspan fill="green">world</tspan>!
</text>
</svg>
Unfortunately, even though you can select and copy text when you open the .svg
file, the text is not selectable when the SVG image is embedded.
Demo: https://gist.github.com/CyberShadow/95621a949b07db295000