colour.CAM_Specification_ZCAM#

class colour.CAM_Specification_ZCAM(J: float | NDArrayFloat | None = <factory>, C: float | NDArrayFloat | None = <factory>, h: float | NDArrayFloat | None = <factory>, s: float | NDArrayFloat | None = <factory>, Q: float | NDArrayFloat | None = <factory>, M: float | NDArrayFloat | None = <factory>, H: float | NDArrayFloat | None = <factory>, HC: float | NDArrayFloat | None = <factory>, V: float | NDArrayFloat | None = <factory>, K: float | NDArrayFloat | None = <factory>, W: float | NDArrayFloat | None = <factory>)[source]#

Define the ZCAM colour appearance model specification.

Parameters:
  • J (float | NDArrayFloat | None) – Lightness \(J\) is the “brightness of an area (\(Q\)) judged relative to the brightness of a similarly illuminated area that appears to be white or highly transmitting (\(Q_w\))”, i.e., \(J = (Q/Q_w)\). It is a visual scale with two well defined levels i.e., zero and 100 for a pure black and a reference white, respectively. Note that in HDR visual field, samples could have a higher luminance than that of the reference white, so the lightness could be over 100. Subscripts \(s\) and \(w\) are used to annotate the sample and the reference white, respectively.

  • C (float | NDArrayFloat | None) – Chroma \(C\) is “colourfulness of an area (\(M\)) judged as a proportion of the brightness of a similarly illuminated area that appears white or highly transmitting (\(Q_w\))”, i.e., \(C = (M/Q_w)\). It is an open-end scale with origin as a colour in the neutral axis. It can be estimated as the magnitude of the chromatic difference between the test colour and a neutral colour having the lightness same as the test colour.

  • h (float | NDArrayFloat | None) – Hue angle \(h\) is a scale ranged from \(0^{\circ}\) to \(360^{\circ}\) with the hues following rainbow sequence. The same distance between pairs of hues in a constant lightness and chroma shows the same perceived colour difference.

  • s (float | NDArrayFloat | None) – Saturation \(s\) is the “colourfulness (\(M\)) of an area judged in proportion to its brightness (\(Q\))”, i.e., \(s = (M/Q)\). It can also be defined as the chroma of an area judged in proportion to its lightness, i.e., \(s = (C/J)\). It is an open-end scale with all neutral colours to have saturation of zero. For example, the red bricks in a building would exhibit different colours when illuminated by daylight. Those (directly) under daylight will appear to be bright and colourful, and those under shadow will appear darker and less colourful. However, the two areas have the same saturation.

  • Q (float | NDArrayFloat | None) – Brightness \(Q\) is an “attribute of a visual perception according to which an area appears to emit, or reflect, more or less light”. It is an open-end scale with origin as pure black or complete darkness. It is an absolute scale according to the illumination condition i.e., an increase of brightness of an object when the illuminance of light is increased. This is a visual phenomenon known as Stevens effect.

  • M (float | NDArrayFloat | None) – Colourfulness \(M\) is an “attribute of a visual perception according to which the perceived colour of an area appears to be more or less chromatic”. It is an open-end scale with origin as a neutral colour i.e., appearance of no hue. It is an absolute scale according to the illumination condition i.e., an increase of colourfulness of an object when the illuminance of light is increased. This is a visual phenomenon known as Hunt effect.

  • H (float | NDArrayFloat | None) – Hue \(h\) quadrature \(H_C\) is an “attribute of a visual perception according to which an area appears to be similar to one of the colours: red, yellow, green, and blue, or to a combination of adjacent pairs of these colours considered in a closed ring”. It has a 0-400 scale, i.e., hue quadrature of 0, 100, 200, 300, and 400 range from unitary red to, yellow, green, blue, and back to red, respectively. For example, a cyan colour consists of 50% green and 50% blue, corresponding to a hue quadrature of 250.

  • HC (float | NDArrayFloat | None) – Hue \(h\) composition \(H^C\) used to define the hue appearance of a sample. Note that hue circles formed by the equal hue angle and equal hue composition appear to be quite different.

  • V (float | NDArrayFloat | None) – Vividness \(V\) is an “attribute of colour used to indicate the degree of departure of the colour (of stimulus) from a neutral black colour”, i.e., \(V = \sqrt{J^2 + C^2}\). It is an open-end scale with origin at pure black. This reflects the visual phenomena of an object illuminated by a light to increase both the lightness and the chroma.

  • K (float | NDArrayFloat | None) – Blackness \(K\) is a visual attribute according to which an area appears to contain more or less black content. It is a scale in the Natural Colour System (NCS) and can also be defined in resemblance to a pure black. It is an open-end scale with 100 as pure black (luminance of 0 \(cd/m^2\)), i.e., \(K = (100 - \sqrt{J^2 + C^2} = (100 - V)\). The visual effect can be illustrated by mixing a black to a colour pigment. The more black pigment is added, the higher blackness will be. A blacker colour will have less lightness and/or chroma than a less black colour.

  • W (float | NDArrayFloat | None) – Whiteness \(W\) is a visual attribute according to which an area appears to contain more or less white content. It is a scale of the NCS and can also be defined in resemblance to a pure white. It is an open-end scale with 100 as reference white, i.e., \(W = (100 - \sqrt{(100 - J)^2 + C^2} = (100 - D)\). The visual effect can be illustrated by mixing a white to a colour pigment. The more white pigment is added, the higher whiteness will be. A whiter colour will have a lower chroma and higher lightness than the less white colour.

References

[SHRL21]

__init__(J: float | NDArrayFloat | None = <factory>, C: float | NDArrayFloat | None = <factory>, h: float | NDArrayFloat | None = <factory>, s: float | NDArrayFloat | None = <factory>, Q: float | NDArrayFloat | None = <factory>, M: float | NDArrayFloat | None = <factory>, H: float | NDArrayFloat | None = <factory>, HC: float | NDArrayFloat | None = <factory>, V: float | NDArrayFloat | None = <factory>, K: float | NDArrayFloat | None = <factory>, W: float | NDArrayFloat | None = <factory>) None#
Parameters:
  • J (float | NDArrayFloat | None) –

  • C (float | NDArrayFloat | None) –

  • h (float | NDArrayFloat | None) –

  • s (float | NDArrayFloat | None) –

  • Q (float | NDArrayFloat | None) –

  • M (float | NDArrayFloat | None) –

  • H (float | NDArrayFloat | None) –

  • HC (float | NDArrayFloat | None) –

  • V (float | NDArrayFloat | None) –

  • K (float | NDArrayFloat | None) –

  • W (float | NDArrayFloat | None) –

Return type:

None

Methods

__init__([J, C, h, s, Q, M, H, HC, V, K, W])

arithmetical_operation(a, operation[, in_place])

Perform given arithmetical operation with \(a\) operand on the dataclass-like class.

Attributes

fields

Getter property for the fields of the dataclass-like class.

items

Getter property for the dataclass-like class items, i.e. the field names and values.

keys

Getter property for the dataclass-like class keys, i.e. the field names.

values

Getter property for the dataclass-like class values, i.e. the field values.

J

C

h

s

Q

M

H

HC

V

K

W