colour.CV_range

colour.CV_range(bit_depth: int = 10, is_legal: bool = False, is_int: bool = False) numpy.ndarray[source]

Return the code value \(CV\) range for given bit depth, range legality and representation.

Parameters
  • bit_depth (int) – Bit depth of the code value \(CV\) range.

  • is_legal (bool) – Whether the code value \(CV\) range is legal.

  • is_int (bool) – Whether the code value \(CV\) range represents integer code values.

Returns

Code value \(CV\) range.

Return type

numpy.ndarray

Examples

>>> CV_range(8, True, True)
array([ 16, 235])
>>> CV_range(8, True, False)  
array([ 0.0627451...,  0.9215686...])
>>> CV_range(10, False, False)
array([ 0.,  1.])