Module colour_spaces

Source
Expand description

Image manipulation effects in HSL, HSLuv, LCh and HSV.

Functions§

darken_hsl
Darken the image by a specified amount in the HSL colour space.
darken_hsluv
Darken the image by a specified amount in the HSLuv colour space.
darken_hsv
Darken the image’s colours by a specified amount in the HSV colour space.
darken_lch
Darken the image by a specified amount in the LCh colour space.
desaturate_hsl
Desaturate the image by a specified amount in the HSL colour space.
desaturate_hsluv
Desaturate the image by a specified amount in the HSLuv colour space.
desaturate_hsv
Desaturate the image by a specified amount in the HSV colour space.
desaturate_lch
Desaturate the image by a specified amount in the LCh colour space.
gamma_correction
Applies gamma correction to an image.
hsl
Image manipulation effects in the HSL colour space.
hsluv
Image manipulation effects in the HSLuv colour space
hsv
Image manipulation in the HSV colour space.
hue_rotate_hsl
Shift hue by a specified number of degrees in the HSL colour space.
hue_rotate_hsluv
Shift hue by a specified number of degrees in the HSLuv colour space.
hue_rotate_hsv
Shift hue by a specified number of degrees in the HSV colour space.
hue_rotate_lch
Shift hue by a specified number of degrees in the LCh colour space.
lch
Image manipulation effects in the LCh colour space
lighten_hsl
Lighten an image by a specified amount in the HSL colour space.
lighten_hsluv
Lighten an image by a specified amount in the HSLuv colour space.
lighten_hsv
Lighten an image by a specified amount in the HSV colour space.
lighten_lch
Lighten an image by a specified amount in the LCh colour space.
mix_with_colour
Mix image with a single color, supporting passing opacity. The algorithm comes from Jimp. See function mix and function colorFn at following link: https://github.com/oliver-moran/jimp/blob/29679faa597228ff2f20d34c5758e4d2257065a3/packages/plugin-color/src/index.js Specifically, result_value = (mix_color_value - origin_value) * opacity + origin_value = mix_color_value * opacity + (1 - opacity) * origin_value for each of RGB channel.
saturate_hsl
Increase the image’s saturation by converting each pixel’s colour to the HSL colour space and increasing the colour’s saturation.
saturate_hsluv
Increase the image’s saturation in the HSLuv colour space.
saturate_hsv
Increase the image’s saturation in the HSV colour space.
saturate_lch
Increase the image’s saturation in the LCh colour space.