Colour
0.3
  • Colour Manual
    • Tutorial
    • Reference
      • Colour
        • Chromatic Adaptation
        • Algebra
        • Colour Appearance Models
        • Biochemistry
        • Colour Characterisation
        • Colorimetry
        • Constants
        • Continuous Signal
        • Corresponding Chromaticities
        • Colour Difference
        • Input and Output
        • Colour Models
        • Colour Notation Systems
        • Optical Phenomena
        • Plotting
        • Colour Quality
        • Reflectance Recovery
        • Colour Temperature
        • Utilities
        • Colour Volume
      • Indices and tables
    • Bibliography
Colour
  • Docs »
  • Colour Manual »
  • Reference »
  • Colour »
  • Colour Models »
  • colour.full_to_legal
  • View page source

colour.full_to_legal¶

colour.full_to_legal(CV, bit_depth=10, in_int=False, out_int=False)[source]¶

Converts given code value \(CV\) or float equivalent of a code value at a given bit depth from full range (full swing) to legal range (studio swing).

Parameters:
  • CV (array_like) – Full range code value \(CV\) or float equivalent of a code value at a given bit depth.
  • bit_depth (int, optional) – Bit depth used for conversion.
  • in_int (bool, optional) – Whether to treat the input value as integer code value or float equivalent of a code value at a given bit depth.
  • out_int (bool, optional) – Whether to return value as integer code value or float equivalent of a code value at a given bit depth.
Returns:

Legal range code value \(CV\) or float equivalent of a code value at a given bit depth.

Return type:

ndarray

Examples

>>> full_to_legal(0.0)  
0.0625610...
>>> full_to_legal(1.0)  
0.9188660...
>>> full_to_legal(0.0, out_int=True)
64
>>> full_to_legal(1.0, out_int=True)
940
>>> full_to_legal(0, in_int=True)  
0.0625610...
>>> full_to_legal(1023, in_int=True)  
0.9188660...
>>> full_to_legal(0, in_int=True, out_int=True)
64
>>> full_to_legal(1023, in_int=True, out_int=True)
940
Next Previous

© Copyright 2013-2018 - Colour Developers.

Built with Sphinx using a theme provided by Read the Docs.