colour_clf_io.SOPNode#
- class colour_clf_io.SOPNode(slope: tuple[float, float, float], offset: tuple[float, float, float], power: tuple[float, float, float])[source]#
Bases:
XMLParsable,XMLWritableRepresent a SOPNode element for a
colour_clf_io.ASC_CDLProcess Node.Attributes
Methods
References
- Parameters:
- slope: tuple[float, float, float]#
Three decimal values representing the R, G, and B slope values, which is similar to gain, but changes the slope of the transfer function without shifting the black level established by offset. Valid values for slope must be greater than or equal to zero. The nominal value is 1.0 for all channels.
- offset: tuple[float, float, float]#
Three decimal values representing the R, G, and B offset values, which raise or lower overall brightness of a color component by shifting the transfer function up or down while holding the slope constant. The nominal value is 0.0 for all channels.
- power: tuple[float, float, float]#
Three decimal values representing the R, G, and B power values, which change the intermediate shape of the transfer function. Valid values for power must be greater than zero. The nominal value is 1.0 for all channels.
- static from_xml(xml: _Element | None, config: ParserConfig) SOPNode | None[source]#
Parse and return a
colour_clf_io.SOPNodeclass instance from the given XML element. Returns None` if the given XML element isNone.Expects the XML element to be a valid element according to the CLF specification.
- Parameters:
xml (_Element | None) – XML element to parse.
config (ParserConfig) – XML parser config.
- Returns:
class – Parsed XML node.
- Return type:
colour_clf_io.SOPNode or
None- Raises:
colour_clf_io.errors.ParsingError – If the node does not conform to the specification, a
ParsingErrorexception will be raised. The error message will indicate the details of the issue that was encountered.
- classmethod default() SOPNode[source]#
Return the default SOPNode instance. Contains the default values that should be used per specification in case the actual value is not provided.
- Returns:
class – Parsed XML node.
- Return type:
colour_clf_io.SOPNode
- __eq__(other)#
Return self==value.
- __hash__ = None#
- __init__(slope: tuple[float, float, float], offset: tuple[float, float, float], power: tuple[float, float, float]) None#
- __repr__()#
Return repr(self).