psychopy.tools.colorspacetools
¶Tools related to working with various color spaces.
The routines provided in the module are used to transform color coordinates between spaces. Most of the functions here are vectorized, allowing for array inputs to convert multiple color values at once.
As of version 2021.0 of PsychoPy, users ought to use the
Color
class for working with color coordinate values.
Conversion functions for the CIELAB and CIELCH color space.
|
Transform CIE L*a*b* (1976) color space coordinates to RGB tristimulus values. |
|
Transform CIE L*C*h* coordinates to RGB tristimulus values. |
Conversion functions for the Derrington Krauskopf and Lennie (DKL) color space.
|
Convert from DKL color space (Derrington, Krauskopf & Lennie) to RGB. |
|
Like dkl2rgb except that it uses cartesian coords (LM,S,LUM) rather than spherical coords for DKL (elev, azim, contr). |
|
Convert an RGB image into Cartesian DKL space. |
Conversion functions for the Hue-Saturation-Value (HSV) color space.
|
Convert from HSV color space to RGB gun values. |
|
Convert values from linear RGB to HSV colorspace. |
|
Convert from cone space (Long, Medium, Short) to RGB. |
|
Convert from RGB to cone space (LMS). |
Standard gamma functions for converting between linear RGB space and sRGB.
|
Apply sRGB transfer function (or gamma) to linear RGB values. |
|
Apply the Rec 709 transfer function (or gamma) to linear RGB values. |
Helper functions for working with color coordinates.
|
Rescale RGB colors. |