cutcutcodec.core.classes.colorspace
Contains all the colorspace informations.
Classes
|
Structure to ensure color space consistency. |
Details
- class cutcutcodec.core.classes.colorspace.Colorspace(space: str | Self, primaries: str | None = None, transfer: str | None = None)[source]
Structure to ensure color space consistency.
See
cutcutcodec.core.colorspacefor more details and explanations.Attributes
- color_primariesint
The ffmpeg primaries code.
- color_trcint
The ffmpeg transfere function.
- primariesstr or None
The tristimulus primaries colors name (gamut). All available values are the keys of
cutcutcodec.core.colorspace.cst.PRIMARIES, defined in the modulecutcutcodec.core.colorspace.cst.- spacestr
The main space name, one of “y’pbpr”, “r’g’b’”, “rgb”, “xyz”. It is defined in
cutcutcodec.core.colorspace.cst.SPACES.- symbolstuple[sympy.Symbol, sympy.Symbol, sympy.Symbol]
The sympy symbols used as input of the expression given by the methode
to.- transferstr or None
The non-linear transfer function name (gamma). All available values are the keys of
cutcutcodec.core.colorspace.cst.TRC, defined in the modulecutcutcodec.core.colorspace.cst.
Parse the colorspace.
Parameters
- spaceColorspace | str
The colorspace formatted as {name}[_{colorspace}], with name in “y’pbpr”, “r’g’b’”, “rgb”, “xyz” (readonly). When several names are given, the first matching in alphabetic order is taken.
- primariesstr, optional
If supplied, this is given priority over
spacefor the gamut (read and write).- transferstr, optional
If supplied, this is given priority over
spacefor the gamma (read and write).