what's a flood-color and lighting-color definition in CSS?

Pacerier picture Pacerier · Aug 8, 2011 · Viewed 8.7k times · Source

Way cool, i'd just realised there is something called flood-color and lighting-color in CSS. Does anyone know what is a flood-color and lighting-color and what do they do?

What exactly do these mean?:

The ‘flood-color’ property indicates what color to use to flood the current filter primitive subregion. The keyword currentColor and ICC colors can be specified in the same manner as within a specification for the ‘fill’ and ‘stroke’ properties.

The ‘lighting-color’ property defines the color of the light source for filter primitives ‘feDiffuseLighting’ and ‘feSpecularLighting’.

How do we apply these so-called SVG effects? I've tried setting the lighting-color to red but there doesn't seem to be any effect whatsoever.

Answer

Jason Gennaro picture Jason Gennaro · Aug 8, 2011

These are SVG filter effects.

The ‘lighting-color’ property defines the color of the light source for filter primitives ‘feDiffuseLighting’ and ‘feSpecularLighting’.

http://www.w3.org/TR/SVG/filters.html#LightingColorProperty

The ‘flood-opacity’ property defines the opacity value to use across the entire filter primitive subregion.

http://www.w3.org/TR/SVG/filters.html#FloodColorProperty