colour_clf_io.SatNode#

class colour_clf_io.SatNode(saturation: float)[source]#

Bases: XMLParsable, XMLWritable

Represent a SatNode element for a colour_clf_io.ASC_CDL Process Node.

Attributes

Methods

References

Parameters:

saturation (float)

saturation: float#

A single decimal value applied to all color channels. Valid values for saturation must be greater than or equal to zero. The nominal value is 1.0.

static from_xml(xml: _Element | None, config: ParserConfig) SatNode | None[source]#

Parse and return a colour_clf_io.SatNode class instance from the given XML element. Returns None` if the given XML element is None.

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.SatNode or None

Raises:

colour_clf_io.errors.ParsingError – If the node does not conform to the specification, a ParsingError exception will be raised. The error message will indicate the details of the issue that was encountered.

to_xml() _Element[source]#

Serialise this object as an XML object.

Return type:

lxml.etree._Element

classmethod default() SatNode[source]#

Return the default SatNode 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.SatNode

__eq__(other)#

Return self==value.

__hash__ = None#
__init__(saturation: float) None#
Parameters:

saturation (float)

Return type:

None

__repr__()#

Return repr(self).