Function zng::color::light_dark

source ·
pub fn light_dark(light: impl Into<Rgba>, dark: impl Into<Rgba>) -> LightDark
Expand description

RGBA color pair.

§Arguments

The arguments can be any color type that converts to Rgba. The first color is used in ColorScheme::Dark contexts, the second color is used in ColorScheme::Light contexts.

Note that LightDark converts IntoVar<Rgba> with a contextual var that selects the color, so you can just set color properties directly with a color pair .