[][src]Function photon::channels::selective_lighten

pub fn selective_lighten(img: &mut PhotonImage, ref_color: Rgb, amt: f32)

Selectively lighten an image.

Only lighten the hue of a pixel if its colour matches or is similar to the RGB colour specified. For example, if a user wishes all pixels that are blue to be lightened, they can selectively specify only the blue pixels to be changed.

Arguments

Example

// For example, to only lighten the pixels that are of or similar to RGB value RGB{20, 40, 60}:
let ref_color = Rgb{20, 40, 60};
photon::channels::selective_lighten(&mut img, ref_color, 0.2);