Skip to main content

is_light

Function is_light 

Source
pub fn is_light(palette: &Palette) -> bool
Expand description

Whether this palette’s page is a light surface.

Decides which of egui’s two presets the visuals start from, and that is not cosmetic even though every widget colour below is overridden: RichText::strong() resolves through dark_mode, so starting from the wrong one paints emphasised text white on a light page.

Perceptual luminance rather than a plain average, so a saturated blue page is not mistaken for a light one.