惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
Recent Announcements
Recent Announcements
A
About on SuperTechFans
N
News and Events Feed by Topic
I
Intezer
B
Blog
GbyAI
GbyAI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
T
Troy Hunt's Blog
TaoSecurity Blog
TaoSecurity Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
The Register - Security
The Register - Security
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
P
Privacy & Cybersecurity Law Blog
S
Secure Thoughts
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
Google Developers Blog
罗磊的独立博客
博客园 - 聂微东
G
GRAHAM CLULEY
AWS News Blog
AWS News Blog
Google Online Security Blog
Google Online Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
C
Check Point Blog
L
Lohrmann on Cybersecurity
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy
O
OpenAI News
T
Tor Project blog
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 最新话题
Forbes - Security
Forbes - Security
云风的 BLOG
云风的 BLOG
C
Cisco Blogs
S
Securelist
博客园_首页

CSS-Tricks

writing-mode | CSS-Tricks pointer-events | CSS-Tricks What’s !important #15: Boundary-aware CSS, Time-based CSS, Full-bleed CSS, and More | CSS-Tricks Get Ready For the Powerful CSS border-shape Property! | CSS-Tricks What’s !important #14: Gap Decorations, random(), <select> field sizing, and More | CSS-Tricks The Shifting Line Between CSS States and JavaScript Events | CSS-Tricks translateZ() | CSS-Tricks translateY() | CSS-Tricks translateX() | CSS-Tricks translate() | CSS-Tricks Using Scroll-Driven Animations for Opposing Scroll Directions | CSS-Tricks A First Look at Scroll-Triggered Animations | CSS-Tricks The Siren Song of  ariaNotify() | CSS-Tricks Prop For That | CSS-Tricks What’s !important #13: @function, alpha(), CSS Wordle, and More | CSS-Tricks There’s no need to include ‘navigation’ in your navigation labels | CSS-Tricks Why Isn't My 3D View Transition Working? | CSS-Tricks Creating Memorable Web Experiences: A Modern CSS Toolkit | CSS-Tricks Scroll-Driven, Scroll-Triggered, Scroll States, and View Transitions | CSS-Tricks Another Stab at the Perfect CSS Pie Chart... Sans JavaScript! | CSS-Tricks offset-path | CSS-Tricks @custom-media | CSS-Tricks @function | CSS-Tricks ::search-text | CSS-Tricks Astro Markdown Component Utility for Any Framework | CSS-Tricks What’s !important #12: Safari Testing, ::checkmark, HTML Anchor Positioning, and More | CSS-Tricks Revealing Text With CSS letter-spacing | CSS-Tricks Technical Writing in the AI Age | CSS-Tricks Cross-Document View Transitions: Scaling Across Hundreds of Elements | CSS-Tricks The State of CSS Centering in 2026 | CSS-Tricks Stack Overflow: When We Stop Asking | CSS-Tricks Cross-Document View Transitions: The Gotchas Nobody Mentions | CSS-Tricks What’s !important #11: 3D Voxel Scenes, Flying Focus, CSS Syntaxes, and More | CSS-Tricks Computing and Displaying Discounted Prices in CSS | CSS-Tricks rotateX() | CSS-Tricks rotateY() | CSS-Tricks rotateZ() | CSS-Tricks rotate() | CSS-Tricks Soon We Can Finally Banish JavaScript to the ShadowRealm | CSS-Tricks Using CSS corner-shape For Folded Corners | CSS-Tricks contrast() | CSS-Tricks contrast-color() | CSS-Tricks hypot() | CSS-Tricks justify-self | CSS-Tricks
saturate() | CSS-Tricks
Gabriel Shoy · 2026-04-09 · via CSS-Tricks

The CSS saturate() function increases or decreases an element’s color saturation level, or in other words, the intensity of the element’s color. The saturate() is used alongside the filter or backdrop-filter properties.

img {
  filter: saturate(200%);
}

The CSS saturate() function is defined in the Filter Effects Module Level 1 specification.

Syntax

The saturate() function’s formal syntax is given as:

<saturate()> = saturate( [ <number> | <percentage> ]? )

In practice, we write it as:

filter: saturate(<amount>);

Argument

The saturate() function takes a single argument, which can be a positive decimal or percentage value. The argument determines the new saturation for the input element, where:

  • 0 or 0% dries out all color from the element, resulting in a grayscale image.
  • 1 or 100% leaves the element completely unchanged.
  • Values above 1 or 100% increase the saturation linearly.

Negative values aren’t allowed.

/* Using percentages */
filter: saturate(0%); /* Completely grayscale */
filter: saturate(50%); /* Low saturation */
filter: saturate(100%); /* Unchanged */
filter: saturate(150%); /* Oversaturated by 1.5x  */

/* Decimal or percentage  */
filter: saturate(0.5);
filter: saturate(50%);

/* No argument */
filter: saturate(); /* Same as 100% or 1 */

/* Negative value */
filter: saturate(-1.5); /* Invalid */

Basic usage

The saturate() filter is rarely used on its own. Instead, we usually couple it with other filter-related functions to produce more interesting effects. For instance, we can combine saturate() with contrast() to give elements an overly vivid, colorful effect.

.dramatic {
  filter: saturate(180%) contrast(120%);
}

…while a slightly increased contrast and a lower saturation help enhance the effect of a mid-range sepia, giving a vintage filter effect:

.vintage {
  filter: saturate(60%) sepia(40%) contrast(110%);
}

And in something like a background, we can use low saturate() and brightness() values to reduce the colors and brightness of the background image, along with blur(4px) to reduce its visibility.

.background {
  filter: saturate(50%) brightness(60%) blur(4px);
}

See examples of each of these in the following demo:

Example: Music preview background

Besides image filters alone, we can use the saturate() function for more practical cases. For example, we could recreate the previews of music apps like Spotify or Apple Music using saturate() + other CSS filters:

.music-bg img {
  filter: blur(30px) saturate(200%) brightness(60%);
}

While the blur() and brightness() filters soften and darken the background, the saturate() filter boosts its colors so they are clearly visible.

Toggle the “vivid mode,” and you’ll notice that saturate(200%) is necessary to keep the background colors from looking dull and washed.

Example: Movie card image

Imagine we’re creating a movie app. Then, we should have a section to showcase new and coming-soon movies. And to keep all movie posters around the same vivid tone, we could use the saturate() function to increase the purity of the poster’s color (along with some other filters) and give it more life.

.movie-card img {
  filter: contrast(130%) saturate(140%) sepia(20%);
}

A slightly increased contrast further distinguishes the dark and light points, while a low sepia adds warmth.

The browser applies filters to an image in the same order as they are declared.

Once again, we can toggle the “Boost Saturation” switch to see what the image would look like with other filters and no increased saturation.

Using saturate() with backdrop-filter

While the filter property applies saturation to the element itself, the backdrop-filter property applies the filter to the area behind it.

A good illustration of this combo is a “color-pop” cursor. It’s a floating element that moves with the mouse, saturating only the portion of the background image it covers.

To get started, we’ll need a little JavaScript to get the cursor coordinates into CSS:

const cursor = document.getElementById("cursor");

window.addEventListener("mousemove", (e) => {
    cursor.style.left = e.clientX + "px";
    cursor.style.top = e.clientY + "px";
});

And initially lower the background image’s saturation.

img {
    filter: saturate(30%) brightness(80%);
}

This allows the effect to pop when the user hovers the spotlight over a section of the background.

.cursor {
    backdrop-filter: saturate(400%) contrast(110%);
}

On hover, the cursor area is supersaturated, making the colors more vibrant.

Specification

The CSS saturate() function is defined, among other filter functions, in the Filter Effects Module 1 specification, which is currently in Editor’s Draft.

Browser support

The saturate() function is currently supported by all modern browsers.