psychopy.tools.colorspacetools.rec709TF

psychopy.tools.colorspacetools.rec709TF(rgb, **kwargs)[source]

Apply the Rec 709 transfer function (or gamma) to linear RGB values.

This transfer function is defined in the ITU-R BT.709 (2015) recommendation document (https://www.itu.int/rec/R-REC-BT.709-6-201506-I/en) and is commonly used with HDTV televisions.

Parameters:

rgb (tuple, list or ndarray of floats) – Nx3 or NxNx3 array of linear RGB values, last dim must be size == 3 specifying RBG values.

Returns:

Array of transformed colors with same shape as input.

Return type:

ndarray


Back to top