pub fn with_lightness(&self, factor: f32) -> Color {
        Color {
            r: clamp(self.r*factor, 0.0, 1.0),
            g: clamp(self.g*factor, 0.0, 1.0),
            b: clamp(self.b*factor, 0.0, 1.0),
            a: self.a
        }
    }
/// Creates a new color based on this color, with the red, green and blue components multiplied
/// by the given factor.
Creates a new color based on this color, with the red, green and blue components multiplied
by the given factor.
Creates a new color based on this color with the red green and blue components multiplied by the given factor .
pub fn with_lightness(&self, factor: f32) -> Color {
        Color {
            r: clamp(self.r*factor, 0.0, 1.0),
            g: clamp(self.g*factor, 0.0, 1.0),
            b: clamp(self.b*factor, 0.0, 1.0),
            a: self.a
        }
    }
pub fn with_lightness ( & self , factor : f32 ) -> Color { Color { r : clamp ( self . r * factor , 0.0 , 1.0 ) , g : clamp ( self . g * factor , 0.0 , 1.0 ) , b : clamp ( self . b * factor , 0.0 , 1.0 ) , a : self . a } }
Creates a new color based on this color, with the red, green and blue components multiplied
by the given factor.
Creates a new color based on this color with the red green and blue components multiplied by the given factor .
&self
factor
f32
&self
factor
f32