colour.full_to_legal#
- colour.full_to_legal(CV: ArrayLike, bit_depth: int = 10, in_int: bool = False, out_int: bool = False) NDArrayReal [source]#
Convert 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 (ArrayLike) – Full range code value \(CV\) or float equivalent of a code value at a given bit-depth.
bit_depth (int) – Bit-depth used for conversion.
in_int (bool) – Whether to treat the input value as int code value or float equivalent of a code value at a given bit-depth.
out_int (bool) – Whether to return value as int 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:
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