[][src]Function photon::colour_spaces::darken_hsl

pub fn darken_hsl(img: &mut PhotonImage, level: f32)

Darken the image by a specified amount in the HSL colour space.

Arguments

Example

// For example to darken an image by 10% in the HSL colour space:
use photon::color_spaces::darken_hsl;
 
// Open the image. A PhotonImage is returned.
let img: PhotonImage = open_image("images/flowers.PNG");
 
darken_hsl(&mut img, 0.1);