I have an SVG glow filter implemented like so:
<filter id="outline">
<feMorphology in="SourceAlpha" operator="dilate" radius="2"></feMorphology>
<feGaussianBlur stdDeviation="1" result="dilated"></feGaussianBlur>
<feFlood style="flood-color: #RRGGBB"></feFlood>
<feComposite in2="dilated" operator="in"></feComposite>
<feMerge>
<feMergeNode></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
This works nicely, but only for one specific glow colour.
I would like to be able to have an arbitrary glow colour, in some way passing a variable in to the flood-color property.
I have tried using currentColor, but this seems to be the colour as it is when the filter is defined, not when it is applied.
I could define a filter for each colour (there will be a limited number of them) but it would be nicer - and certainly more space-efficient - to only need to define it once. Is this possible and if so how?