colour_clf_io.ExponentParams#

class colour_clf_io.ExponentParams(exponent: float, offset: float | None, channel: Channel | None)[source]#

Bases: XMLParsable, XMLWritable

Represent a ExponentParams element for a colour_clf_io.Exponent Process Node.

Attributes

Methods

References

Parameters:
__eq__(other)#

Return self==value.

__hash__ = None#
__init__(exponent: float, offset: float | None, channel: Channel | None) None#
Parameters:
Return type:

None

__repr__()#

Return repr(self).

exponent: float#

The power to which the value is to be raised. If style is any of the “monCurve” types, the valid range is [1.0, 10.0]. The nominal value is 1.0.

offset: float | None#

The offset value to use. If offset is used, the enclosing Exponent element’s style attribute must be set to one of the “monCurve” types. Offset is not allowed when style is any of the “basic” types. The valid range is [0.0, 0.9]. The nominal value is 0.0.

channel: Channel | None#

The colour channel to which the exponential function is applied. Possible values are “R”, “G”, “B”. If this attribute is utilized to target different adjustments per channel, then up to three ExponentParams elements may be used, provided that “channel” is set differently in each. However, the same value of base must be used for all channels. If this attribute is not otherwise specified, the logarithmic function is applied identically to all three colour channels.

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

Parse and return a colour_clf_io.ExponentParams 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.ExponentParams 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() ExponentParams[source]#

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