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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Announcements
Recent Announcements
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News | PayPal Newsroom
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
S
Security @ Cisco Blogs
K
Kaspersky official blog
A
Arctic Wolf
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Last Watchdog
The Last Watchdog
T
The Exploit Database - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Security Archives - TechRepublic
Security Archives - TechRepublic
V
V2EX
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
F
Full Disclosure
I
Intezer
Schneier on Security
Schneier on Security
AWS News Blog
AWS News Blog
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
M
MIT News - Artificial intelligence
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
量子位
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
Google Online Security Blog
Google Online Security Blog
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
C
Check Point Blog
N
Netflix TechBlog - Medium
博客园 - Franky
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
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.