Skip to content

color

Utilities for controlling the foreground text color with full Tailwind palette, opacity, and @theme support.

ISS preview
Iced + ISS preview demonstrating color
ISS preview for color
use iced::widget::text;
use iss::{tw, TwExt};
let title = text("ISS Docs").tw(tw!("text-lg font-bold text-zinc-900 dark:text-white"));
Tailwind Class CSS Property / Effect iss::typed Builder
text-<color>-<shade> color: <palette>; .text_color(palette::SKY_400)
text-white / text-black color: #ffffff / #000000; .text_color(palette::WHITE)
text-sky-400/80 Alpha-modified text color; .text_color(palette::SKY_400.alpha(0.8))
text-inherit / current / transparent Keyword text colors; .text_inherit() / .text_current()
text-[#38bdf8] Arbitrary hex/rgb color; .text_color(IssColor::hex(0x38BDF8))
text-(--color-fg) color: var(--color-fg); .text_color_var("--color-fg")

background-color · text-decoration-color · caret-color