Advertisement
XCanG

[SVG] Color filter example

Mar 16th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.79 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Color filter</title>
  5.     </head>
  6.     <body>
  7.         <svg id="svg" height="90" width="420">
  8.             <defs id="defs1">
  9.                 <filter id="filter5452" style="color-interpolation-filters:sRGB">
  10.                     <feFlood id="feFlood5458" result="flood" flood-opacity="1" flood-color="rgb(255,0,0)" />
  11.                     <feComposite id="feComposite5468" result="composite1" operator="in" in2="SourceGraphic" in="flood" />
  12.                 </filter>
  13.             </defs>
  14.             <g id="layer1">
  15.                 <text id="text4136" y="40" x="0" style="font-size:40px;font-family:sans-serif;fill:#000000;fill-opacity:1;filter:url(#filter5452)">Filter effects on text</text>
  16.                 <text id="text4140" y="80" x="0" style="font-size:40px;font-family:sans-serif;fill:#000000;fill-opacity:1;">Default text</text>
  17.             </g>
  18.         </svg>
  19.     </body>
  20. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement