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

推荐订阅源

A
About on SuperTechFans
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
I
InfoQ
C
Check Point Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
Last Week in AI
Last Week in AI
GbyAI
GbyAI
P
Proofpoint News Feed
量子位
Stack Overflow Blog
Stack Overflow Blog
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
B
Blog
T
The Blog of Author Tim Ferriss
H
Help Net Security
云风的 BLOG
云风的 BLOG

CSS-Tricks

Let’s Use the Emergent CSS random() Function in all the Browsers | CSS-Tricks What’s !important #18: <geolocation>, Syntax ::highlight()ing, named-feature(), and More | CSS-Tricks Creating Web Widgets Using the Document Picture-in-Picture API | CSS-Tricks animation-trigger | CSS-Tricks MicroLighter: Syntax Highlighter | CSS-Tricks WordPress PHP-Only Block Registration | CSS-Tricks Resolved: CSS Class Prefix Selector | CSS-Tricks CSS Navigation Matching, Early Days | CSS-Tricks WordPress.com Student Plan | CSS-Tricks Dark mode toggles: two states are enough | CSS-Tricks What’s !important #17: Custom Highlight API, CSS Navigation Matching, Fixing text-stroke, and More | CSS-Tricks Blocked aria-hidden: The Warning is Right, and Every Fix You've Found is Wrong | CSS-Tricks Animating CSS border-image | CSS-Tricks SmashingConf Freiburg 2026, September 7-10 | CSS-Tricks Using and Styling the Dialog Element | CSS-Tricks 2026 State of CSS, Devs Surveys | CSS-Tricks Gap Decorations Are Now Available, Here’s What’s New | CSS-Tricks What’s !important #16: sibling-index() Animations, Use Cases for the infinity Keyword, Container Stuck Queries, and More | 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
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.