Annotation Type Hints#

colour.hints

ArrayLike

alias of Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]

NDArray

ndarray(shape, dtype=float, buffer=None, offset=0,

ModuleType

alias of module

Any(*args, **kwargs)

Special type indicating an unconstrained type.

Callable

Deprecated alias to collections.abc.Callable.

ClassVar

Special type construct to mark class variables.

Dict

A generic version of dict.

Generator()

Iterable()

Iterator()

List

A generic version of list.

Literal

Special typing form to define literal types (a.k.a.

Mapping()

A Mapping is a generic container for associating key/value pairs.

NewType(name, tp)

NewType creates simple unique types with almost zero runtime overhead.

Optional

Optional[X] is equivalent to Union[X, None].

Protocol()

Base class for protocol classes.

Sequence()

All the operations on a read-only sequence.

SupportsIndex(*args, **kwargs)

An ABC with one abstract method __index__.

TYPE_CHECKING

bool(x) -> bool

TextIO()

Typed version of the return of open() in text mode.

Tuple

Deprecated alias to builtins.tuple.

Type

Deprecated alias to builtins.type.

TypeVar(name, *constraints[, bound, ...])

Type variable.

TypedDict(typename[, fields, total])

A simple typed namespace.

Union

Union type; Union[X, Y] means either X or Y.

cast(typ, val)

Cast a value to a type.

overload(func)

Decorator for overloaded functions/methods.

runtime_checkable(cls)

Mark a protocol class as a runtime protocol.

Self

Used to spell the type of "self" in classes.

RegexFlag

NewType creates simple unique types with almost zero runtime overhead.

DTypeInt

alias of Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64]

DTypeFloat

alias of Union[float16, float32, float64]

DTypeReal

alias of Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64]

DTypeComplex

alias of Union[complex64, complex128]

DTypeBoolean

alias of bool_

DType

alias of Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, complex64, complex128]

Real

alias of Union[int, float]

Dataclass

alias of Any

NDArrayInt

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayFloat

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayReal

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayComplex

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayBoolean

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayStr

ndarray(shape, dtype=float, buffer=None, offset=0,

ProtocolInterpolator(*args, **kwargs)

ProtocolExtrapolator(*args, **kwargs)

ProtocolLUTSequenceItem(*args, **kwargs)

LiteralWarning

alias of Literal['default', 'error', 'ignore', 'always', 'module', 'once']

LiteralChromaticAdaptationTransform

alias of Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02', 'CAT02 Brill 2008', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling']

LiteralColourspaceModel

alias of Literal['CAM02LCD', 'CAM02SCD', 'CAM02UCS', 'CAM16LCD', 'CAM16SCD', 'CAM16UCS', 'CIE Lab', 'CIE Luv', 'CIE UCS', 'CIE UVW', 'CIE XYZ', 'CIE xyY', 'DIN99', 'HCL', 'HSL', 'HSV', 'Hunter Lab', 'Hunter Rdab', 'ICaCb', 'ICtCp', 'IHLS', 'IPT', 'IPT Ragoo 2021', 'IgPgTg', 'Jzazbz', 'OSA UCS', 'Oklab', 'RGB', 'YCbCr', 'YCoCg', 'Yrg', 'hdr-CIELAB', 'hdr-IPT']

LiteralRGBColourspace

alias of Literal['ACES2065-1', 'ACEScc', 'ACEScct', 'ACEScg', 'ACESproxy', 'ALEXA Wide Gamut', 'ARRI Wide Gamut 3', 'ARRI Wide Gamut 4', 'Adobe RGB (1998)', 'Adobe Wide Gamut RGB', 'Apple RGB', 'Best RGB', 'Beta RGB', 'Blackmagic Wide Gamut', 'CIE RGB', 'Cinema Gamut', 'ColorMatch RGB', 'DCDM XYZ', 'DCI-P3', 'DCI-P3-P', 'DJI D-Gamut', 'DRAGONcolor', 'DRAGONcolor2', 'DaVinci Wide Gamut', 'Display P3', 'Don RGB 4', 'EBU Tech.

LiteralLogEncoding

alias of Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ARRI LogC3', 'ARRI LogC4', 'Apple Log Profile', 'Canon Log', 'Canon Log 2', 'Canon Log 3', 'Cineon', 'D-Log', 'ERIMM RGB', 'F-Log', 'F-Log2', 'Filmic Pro 6', 'L-Log', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'Protune', 'REDLog', 'REDLogFilm', 'S-Log', 'S-Log2', 'S-Log3', 'T-Log', 'V-Log', 'ViperLog']

LiteralLogDecoding

alias of Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ARRI LogC3', 'ARRI LogC4', 'Apple Log Profile', 'Canon Log', 'Canon Log 2', 'Canon Log 3', 'Cineon', 'D-Log', 'ERIMM RGB', 'F-Log', 'F-Log2', 'Filmic Pro 6', 'L-Log', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'Protune', 'REDLog', 'REDLogFilm', 'S-Log', 'S-Log2', 'S-Log3', 'T-Log', 'V-Log', 'ViperLog']

LiteralOETF

alias of Literal['ARIB STD-B67', 'Blackmagic Film Generation 5', 'DaVinci Intermediate', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'ITU-T H.273 IEC 61966-2', 'ITU-T H.273 Log', 'ITU-T H.273 Log Sqrt', 'SMPTE 240M']

LiteralOETFInverse

alias of Literal['ARIB STD-B67', 'Blackmagic Film Generation 5', 'DaVinci Intermediate', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'ITU-T H.273 IEC 61966-2', 'ITU-T H.273 Log', 'ITU-T H.273 Log Sqrt']

LiteralEOTF

alias of Literal['DCDM', 'DICOM GSDF', 'ITU-R BT.1886', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-T H.273 ST.428-1', 'SMPTE 240M', 'ST 2084', 'sRGB']

LiteralEOTFInverse

alias of Literal['DCDM', 'DICOM GSDF', 'ITU-R BT.1886', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-T H.273 ST.428-1', 'ST 2084', 'sRGB']

LiteralCCTFEncoding

alias of Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ARIB STD-B67', 'ARRI LogC3', 'ARRI LogC4', 'Apple Log Profile', 'Blackmagic Film Generation 5', 'Canon Log', 'Canon Log 2', 'Canon Log 3', 'Cineon', 'D-Log', 'DCDM', 'DICOM GSDF', 'DaVinci Intermediate', 'ERIMM RGB', 'F-Log', 'F-Log2', 'Filmic Pro 6', 'Gamma 2.2', 'Gamma 2.4', 'Gamma 2.6', 'ITU-R BT.1886', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'ITU-T H.273 IEC 61966-2', 'ITU-T H.273 Log', 'ITU-T H.273 Log Sqrt', 'ITU-T H.273 ST.428-1', 'L-Log', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'ProPhoto RGB', 'Protune', 'REDLog', 'REDLogFilm', 'RIMM RGB', 'ROMM RGB', 'S-Log', 'S-Log2', 'S-Log3', 'SMPTE 240M', 'ST 2084', 'T-Log', 'V-Log', 'ViperLog', 'sRGB']

LiteralCCTFDecoding

alias of Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ARIB STD-B67', 'ARRI LogC3', 'ARRI LogC4', 'Apple Log Profile', 'Blackmagic Film Generation 5', 'Canon Log', 'Canon Log 2', 'Canon Log 3', 'Cineon', 'D-Log', 'DCDM', 'DICOM GSDF', 'DaVinci Intermediate', 'ERIMM RGB', 'F-Log', 'F-Log2', 'Filmic Pro 6', 'Gamma 2.2', 'Gamma 2.4', 'Gamma 2.6', 'ITU-R BT.1886', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'ITU-T H.273 IEC 61966-2', 'ITU-T H.273 Log', 'ITU-T H.273 Log Sqrt', 'ITU-T H.273 ST.428-1', 'L-Log', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'ProPhoto RGB', 'Protune', 'REDLog', 'REDLogFilm', 'RIMM RGB', 'ROMM RGB', 'S-Log', 'S-Log2', 'S-Log3', 'SMPTE 240M', 'ST 2084', 'T-Log', 'V-Log', 'ViperLog', 'sRGB']

LiteralOOTF

alias of Literal['ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']

LiteralOOTFInverse

alias of Literal['ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']

LiteralLUTReadMethod

alias of Literal['Cinespace', 'Iridas Cube', 'Resolve Cube', 'Sony SPI1D', 'Sony SPI3D', 'Sony SPImtx']

LiteralLUTWriteMethod

alias of Literal['Cinespace', 'Iridas Cube', 'Resolve Cube', 'Sony SPI1D', 'Sony SPI3D', 'Sony SPImtx']

LiteralFontScaling

alias of Literal['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'larger', 'smaller', 'xx-small-colour-science', 'x-small-colour-science', 'small-colour-science', 'medium-colour-science', 'large-colour-science', 'x-large-colour-science', 'xx-large-colour-science']