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

推荐订阅源

云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
腾讯CDC
C
CERT Recently Published Vulnerability Notes
J
Java Code Geeks
WordPress大学
WordPress大学
博客园 - Franky
V
Vulnerabilities – Threatpost
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Martin Fowler
Martin Fowler
Webroot Blog
Webroot Blog
Attack and Defense Labs
Attack and Defense Labs
Google Online Security Blog
Google Online Security Blog
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Troy Hunt's Blog
Scott Helme
Scott Helme
Project Zero
Project Zero
T
Tailwind CSS Blog
The Register - Security
The Register - Security
A
About on SuperTechFans
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
S
Security Affairs
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
H
Heimdal Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
PCI Perspectives
PCI Perspectives
The Cloudflare Blog
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
AI
AI

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.