effects
backdropHueRotate
Rotates the backdrop's hue while preserving lightness and saturation, so a busy backdrop pulls toward one brand hue with its light/dark structure intact.
import { backdropHueRotate } from "@sdxc/u/effects";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.backdropHueRotate() | css({ "--ui-backdrop-hue-rotate": "90deg", backdropFilter: "... hue-rotate(var(--ui-backdrop-hue-rotate, 0deg)) ...", WebkitBackdropFilter: "... hue-rotate(var(--ui-backdrop-hue-rotate, 0deg)) ..." }) |
u.transparencySafe(u.backdropHueRotate("0.5turn")) | css({ "@media (prefers-reduced-transparency: no-preference)": { "--ui-backdrop-hue-rotate": "0.5turn", backdropFilter: "...", WebkitBackdropFilter: "..." } }) |
Using a custom value
Every scale argument also takes a raw CSS value, which passes through untouched.
u.backdropHueRotate()Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.backdropHueRotate())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.backdropHueRotate())Customizing the theme
The custom properties this utility reads, which a theme redefines.
| Variable |
|---|
--ui-backdrop-hue-rotate |
Signature
u.backdropHueRotate(value?: AngleValue)