Skip to main content

with_alpha_scaled

Function with_alpha_scaled 

pub fn with_alpha_scaled(c: AlphaColor<Srgb>, factor: f32) -> AlphaColor<Srgb>
Expand description

c with its alpha multiplied by factor (0.0 transparent, 1.0 unchanged), keeping its RGB. Unlike with_alpha, this scales the alpha the theme already gave the colour instead of replacing it with an absolute value.