property

Lighting color — CSS reference

Defines the light color for SVG diffuse and specular lighting primitives. The effect also depends on the light source, surface and other primitive parameters.

Formal Syntax & Structure

css syntaxcss
lighting-color: red;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>lighting-color</title><style>body{margin:0;background:white}svg{display:block}#a{lighting-color:red}</style><body><svg xmlns="http://www.w3.org/2000/svg" width="240" height="160" viewBox="0 0 240 160" role="img" aria-label="SVG styling example"><defs><filter id="f"><feDiffuseLighting id="a" in="SourceAlpha" surfaceScale="2" diffuseConstant="1"><feDistantLight azimuth="45" elevation="60"/></feDiffuseLighting></filter></defs><rect x="40" y="40" width="100" height="80" filter="url(#f)"/></svg></body></html>
CSS Reference