[−][src]Function photon_rs::colour_spaces::hsl
pub fn hsl(photon_image: &mut PhotonImage, mode: &str, amt: f32)
Image manipulation effects in the HSL colour space.
Effects include:
- saturate - Saturation increase.
- desaturate - Desaturate the image.
- shift_hue - Hue rotation by a specified number of degrees.
- darken - Decrease the brightness.
- lighten - Increase the brightness.
Arguments
photon_image
- A PhotonImage.mode
- The effect desired to be applied. Choose from:saturate
,desaturate
,shift_hue
,darken
,lighten
amt
- A float value from 0 to 1 which represents the amount the effect should be increased by.
Example
// For example to increase the saturation by 10%: use photon::color_spaces::hsl; // Open the image. A PhotonImage is returned. let img: PhotonImage = open_image("images/flowers.PNG"); hsl(&mut img, "saturate", 0.1);