pub fn darken_hsl(img: &mut PhotonImage, level: f32)Expand description
Darken the 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 darken the image by. Thelevelmust be from 0 to 1 in floating-point,f32format. Darkening by 80% would be represented by alevelof 0.8
§Example
// For example to darken an image by 10% in the HSL colour space:
use photon_rs::colour_spaces::darken_hsl;
use photon_rs::native::open_image;
// Open the image. A PhotonImage is returned.
let mut img = open_image("img.jpg").expect("File should open");
darken_hsl(&mut img, 0.1_f32);