[−][src]Function photon::colour_spaces::lighten_hsl
pub fn lighten_hsl(img: &mut PhotonImage, level: f32)
Lighten an image by a specified amount in the HSL colour space.
Arguments
img
- A PhotonImage.level
- Float value from 0 to 1 representing the level to which to lighten the image by. Thelevel
must be from 0 to 1 in floating-point,f32
format. Lightening by 80% would be represented by alevel
of 0.8
Example
// For example to lighten an image by 10% in the HSL colour space: use photon::color_spaces::lighten_hsl; // Open the image. A PhotonImage is returned. let img: PhotonImage = open_image("images/flowers.PNG"); lighten_hsl(&mut img, 0.1);