
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
chromatic-blur
Advanced tools
A lightweight, zero-dependency JavaScript plugin for creating stunning chromatic aberration blur effects
A lightweight (2.1 KB gzipped), zero-dependency JavaScript plugin for creating stunning chromatic aberration blur effects using SVG filters.

<!-- Minified version (6.4 KB, 2.1 KB gzipped) -->
<script type="module">
import ChromaticBlur from 'https://unpkg.com/chromatic-blur@1.0.0/dist/chromatic-blur.min.js';
const blur = new ChromaticBlur('.element');
</script>
<!-- Development version with comments (10.5 KB) -->
<script type="module">
import ChromaticBlur from 'https://unpkg.com/chromatic-blur@1.0.0/dist/chromatic-blur.js';
</script>
npm install chromatic-blur
import ChromaticBlur from 'chromatic-blur';
// Basic usage
const blur = new ChromaticBlur('.my-element');
// With custom options
const blur = new ChromaticBlur('.navbar', {
redOffset: 8,
blueOffset: -8,
blurAmount: 5
});
| Option | Type | Default | Description |
|---|---|---|---|
redOffset | number | 5 | Red channel offset in pixels (positive = right) |
blueOffset | number | -5 | Blue channel offset in pixels (negative = left) |
blurAmount | number | 3 | Gaussian blur standard deviation |
turbulenceFrequency | number | 0.001 | Turbulence noise frequency (lower = smoother) |
displacementScale | number | 50 | Displacement map scale for wavy distortion |
borderColor | string | 'rgba(156, 156, 156, 0.2)' | Border color for glass effect |
addOverlay | boolean | true | Add gradient overlay layer |
addNoise | boolean | true | Add noise overlay layer |
update(options)Update effect options dynamically. Returns this for chaining.
blur.update({ redOffset: 10, blurAmount: 6 });
enable()Enable the effect (if previously disabled). Returns this for chaining.
blur.enable();
disable()Temporarily disable the effect. Returns this for chaining.
blur.disable();
destroy()Remove the effect and cleanup all resources.
blur.destroy();
ChromaticBlur.destroyAll()Cleanup all instances. Useful for Single Page Applications.
ChromaticBlur.destroyAll();
const nav = new ChromaticBlur('.navbar', {
redOffset: 5,
blueOffset: -5,
blurAmount: 3
});
const hero = new ChromaticBlur('.hero-section', {
redOffset: 15,
blueOffset: -15,
blurAmount: 8,
displacementScale: 100
});
const card = new ChromaticBlur('.card', {
redOffset: 2,
blueOffset: -2,
blurAmount: 2,
addNoise: false,
addOverlay: false
});
const blur = new ChromaticBlur('.element')
.update({ blurAmount: 5 })
.enable();
// Later...
blur.disable().update({ redOffset: 10 }).enable();
const blur = new ChromaticBlur('.navbar');
// Adjust based on scroll position
window.addEventListener('scroll', () => {
const scrollPercent = window.scrollY / document.body.scrollHeight;
blur.update({
blurAmount: 3 + (scrollPercent * 10),
redOffset: 5 + (scrollPercent * 10)
});
});
// React useEffect example
useEffect(() => {
const blur = new ChromaticBlur('.navbar');
return () => {
blur.destroy(); // Cleanup on unmount
};
}, []);
// Or cleanup all instances at once
ChromaticBlur.destroyAll();
Works in all modern browsers that support:
backdrop-filter (with -webkit- prefix for Safari)For best results, ensure background content has sufficient contrast.
destroy() when removing elementsMIT License - feel free to use in personal and commercial projects!
Created as a demonstration of modern vanilla JavaScript plugin development.
FAQs
A lightweight, zero-dependency JavaScript plugin for creating stunning chromatic aberration blur effects
The npm package chromatic-blur receives a total of 5 weekly downloads. As such, chromatic-blur popularity was classified as not popular.
We found that chromatic-blur demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.