Skip to content

grayscale

Utilities for desaturating an element using the W3C Rec.709 grayscale color matrix.

ISS preview
Iced + ISS preview demonstrating grayscale
ISS preview for grayscale
use iced::widget::container;
use iss::{tw, TwExt};
let avatar = container(img).tw(tw!("grayscale hover:grayscale-0 rounded-full overflow-hidden"));
Tailwind Class CSS Property / Effect iss::typed Builder
grayscale filter: grayscale(100%); .grayscale()
grayscale-0 filter: grayscale(0%); .grayscale_0()
grayscale-50 / grayscale-[0.75] Partial desaturation; .grayscale_pct(50.0)

sepia · saturate · backdrop-grayscale