SVG Noise
How do I make an svg noise?
Testing applying noise to SVG. This is a method for applying noise to an entire complex shape object.. What is a svg noise? How do you make a svg noise? This script and codes were developed by Chris Wright on 12 July 2022, Tuesday.
SVG Noise - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SVG Noise</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <svg class="icon-svg icon-svg--bolt" viewBox="0 0 24 24" width="96" height="96" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <clipPath id="the-object"> <path fill="currentColor" d="M 12 3 v 7 h 6 l -6 11 v -7 h -6 l 6 -11"> </path> </clipPath> <filter id="noise"> <feTurbulence type="fractalNoise" baseFrequency="30" result="noisy" /> <feColorMatrix type="saturate" values="0"/> <feBlend in="SourceGraphic" in2="noisy" mode="multiply" /> </filter> </defs> <g> <path filter="url(#noise)" clip-path="url(#the-object)" fill="currentColor" d="M 12 3 v 7 h 6 l -6 11 v -7 h -6 l 6 -11"> </path> </g> </svg>
</div> <script src="js/index.js"></script>
</body>
</html>
SVG Noise - Script Codes CSS Codes
.container { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; min-height: 100vh;
}
.icon-svg { width: 384px; height: 384px; display: block;
}
.icon-svg--bolt { color: #5ecf86;
}
SVG Noise - Script Codes JS Codes
//How you apply Noise to an SVG shape
//This is how to apply it to the entire shape.
//Next test will be how you can apply it to only part of the shape.
//How this works:
//1) feTurbulence is what gives you some fractal turbulence, which is sorta cloudy/noisy. Setting the base frequency higher increases the noise.
//2) We use colorMatrix to essentially desaturate the image
//3) Finally you blend it all in together and switch the mode to overlay (so you see it over the top of your object). You can add this noise in any way you might have if you were using Photoshop - Overlay/Screen/Multiply etc.
//4) Then we need to define a clip path in the defs. To do this I just copied my shape into clipPath, and then applied it to my final object with clip-path="url(#the-object)"
Developer | Chris Wright |
Username | chriswrightdesign |
Uploaded | July 12, 2022 |
Rating | 3 |
Size | 2,930 Kb |
Views | 60,720 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Macbook Air SVG | 11,283 Kb |
Typography SVG experiment | 3,472 Kb |
Experiments with nth-of-type animation | 3,015 Kb |
SVG Noise over gradient Experiment | 6,168 Kb |
Background Noisy Radial Gradient | 3,207 Kb |
Grid - Auto-fit demo | 3,128 Kb |
Form adaptation | 2,899 Kb |
Inertia CSS | 5,065 Kb |
Reverse cascade | 3,976 Kb |
CSS Responsive animated Accordion | 4,834 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Polygon Logo in CSS | Kai | 3,412 Kb |
Mini Profile | Frytyler | 3,828 Kb |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Website Concept | Sagoza | 3,104 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Pomodoro Clock | Osycon | 3,705 Kb |
Background Images | Jooonebug | 2,100 Kb |
Vanilla JS - A toggleClass function | Woodwork | 2,532 Kb |
No Vacancy 404 CSS Only | Sethkontny | 0 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!