libadwaita

Function rgba_to_standalone

Source
pub fn rgba_to_standalone(rgba: &RGBA, dark: bool) -> RGBA
Available on crate feature v1_6 only.
Expand description

Adjusts @rgba to be suitable as a standalone color.

It will typically be darker for light background, and lighter for dark background, ensuring contrast.

§rgba

a background color

§dark

Whether to calculate standalone color for light or dark background

§Returns

§standalone_rgba

return location for the standalone color