colour.offset_YCbCr#

colour.offset_YCbCr(bits: int = 8, is_legal: bool = False, is_int: bool = False) NDArrayFloat[source]#

Compute the R’G’B’ to Y’CbCr offsets for the specified bit-depth, range legality and representation.

The related R’G’B’ to Y’CbCr matrix can be computed with the colour.matrix_YCbCr() definition.

Parameters:
  • bits (int) – Bit-depth of the Y’CbCr colour encoding ranges array.

  • is_legal (bool) – Whether the Y’CbCr colour encoding ranges array is legal.

  • is_int (bool) – Whether the Y’CbCr colour encoding ranges array represents int code values.

Returns:

Y’CbCr offsets.

Return type:

numpy.ndarray

Examples

>>> offset_YCbCr()
array([0., 0., 0.])
>>> offset_YCbCr(is_legal=True)
array([0.0627451..., 0.5019607..., 0.5019607...])