SVG FESpecularLighting.specularConstant Property Last Updated : 30 Mar, 2022 Comments Improve Suggest changes Like Article Like Report The SVG FESpecularLighting.specularConstant property returns the SVGAnimatedNumber object corresponding to the specularConstant component of the FESpecularLighting.specularConstant element. Syntax: var a = FESpecularLighting.specularConstant Return value: This property returns the SVGAnimatedNumber object corresponding to the specularConstant component of the FESpecularLighting.specularConstant element. Example 1: HTML <!DOCTYPE html> <html> <body> <svg height="200" width="200" viewBox="0 0 220 220"> <filter id="filter"> <feSpecularLighting in="BackgroundImage" specularConstant="0.8" surfaceScale="1" specularExponent="20" kernelUnitLength="1" lighting-color="red" id="gfg"> <fePointLight x="100" y="100" z="220" /> </feSpecularLighting> <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" /> </filter> <rect x="60" y="60" width="150" height="150" style="stroke: #000000; fill: lightgreen; filter: url(#filter);" /> <script type="text/javascript"> var g = document.getElementById("gfg"); console.log(g.specularConstant); console.log("specularConstant value is : ", g.specularConstant.baseVal) </script> </svg> </body> </html> Output: Example 2: HTML <!DOCTYPE html> <html> <body> <svg height="200" width="200"> <filter id="filter"> <feSpecularLighting specularExponent="5" lighting-color="gold" result="light" surfaceScale="5" in="SourceGraphic" specularConstant="1.3" id="gfg"> <fePointLight x="100" y="100" z="100" /> </feSpecularLighting> <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" k1="1" k2="0" k3="1" k4="0" /> </filter> <rect x="1" y="1" width="200" height="200" style="stroke: #000000; fill: green; filter: url(#filter);" /> <rect x="50" y="50" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#filter);" /> <g fill="#FFFFFF" stroke="black" font-size="10" font-family="Verdana" /> <text x="60" y="100">GeeksForGeeks</text> <script type="text/javascript"> var g = document.getElementById("gfg"); console.log(g.specularConstant); console.log("specularConstant value is : ", g.specularConstant.baseVal) </script> </svg> </body> </html> Output: Example 3: HTML <!DOCTYPE html> <html> <body> <svg height="200" width="200" viewBox="0 0 220 220"> <filter id="filter"> <feSpecularLighting specularExponent="2" lighting-color="shadow" result="light" surfaceScale="6" in="BackgroundImage" specularConstant="5" id="gfg"> <fePointLight x="200" y="200" z="100" /> </feSpecularLighting> <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" /> </filter> <rect x="40" y="40" width="200" height="200" style="stroke: black; fill: green; filter: url(#filter);" /> <circle cx="130" cy="130" r="50" style="fill: black; filter:url(#filter)" /> <script type="text/javascript"> var g = document.getElementById("gfg"); console.log(g.specularConstant); console.log("specularConstant value is : ", g.specularConstant.baseVal) </script> </svg> </body> </html> Output: Supported Browsers: Google ChromeEdgeFirefoxSafariOperaInternet Explorer Comment T taran910 Follow 0 Improve T taran910 Follow 0 Improve Article Tags : Web Technologies HTML HTML-SVG SVG-Property Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like