sdxc

Type to search, or start from one of these:

effects

saturate

Applies a filter: saturate(...) to the element itself, where 0 is fully desaturated and values above 1 oversaturate.

import { saturate } from "@sdxc/u/effects";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.saturate(1.5)css({ "--ui-filter-saturate": "1.5", filter: "... saturate(var(--ui-filter-saturate, 1)) ..." })

Using a custom value

Every scale argument also takes a raw CSS value, which passes through untouched.

u.saturate("2.75rem")

Applying on a state

Wrap the call in a state utility to scope it to one selector.

u.hover(u.saturate(1.5))

Responsive design

Wrap the call in a container query to scope it to one width.

u.at("md", u.saturate(1.5))

Customizing the theme

The custom properties this utility reads, which a theme redefines.

Variable
--ui-filter-saturate

Signature

u.saturate(value?: number | (string & {}))