colour.offset_YCbCr

colour.offset_YCbCr(bits=8, is_legal=False, is_int=False)[source]

Computes the R’G’B’ to Y’CbCr offsets for given 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 integer code values.

Returns

Y’CbCr matrix.

Return type

ndarray

Examples

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