colour.models.cie_ucs Module — Colour 0.3.0 documentation

# colour.models.cie_ucs Module

## CIE UCS Colourspace

Defines the CIE UCS colourspace transformations:

- `XYZ_to_UCS()`
- `UCS_to_XYZ()`
- `UCS_to_uv()`
- `UCS_uv_to_xy()`

See also

CIE UCS Colourspace IPython Notebook

References

[1] | http://en.wikipedia.org/wiki/CIE_1960_color_space (Last accessed 24 February 2014)

`colour.models.cie_ucs.` `XYZ_to_UCS`(XYZ)

  Converts from CIE XYZ colourspace to CIE UCS colourspace.

  Parameters: | XYZ (array_like, (3,)) – CIE XYZ colourspace matrix.
  Returns: | CIE UCS colourspace matrix.
  Return type: | ndarray, (3,)

  Notes

  - Input CIE XYZ colourspace matrix is in domain [0, 1].
  - Output CIE UCS colourspace matrix is in domain [0, 1].

  References

  [2] | http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIEXYZ (Last accessed 24 February 2014)

  Examples

      >>> XYZ = np.array([0.1180583421, 0.1034, 0.0515089229])
      >>> XYZ_to_UCS(XYZ)
      array([ 0.0787055...,  0.1034    ,  0.1218252...])

`colour.models.cie_ucs.` `UCS_to_XYZ`(UVW)

  Converts from CIE UCS colourspace to CIE XYZ colourspace.

  Parameters: | UVW (array_like, (3,)) – CIE UCS colourspace matrix.
  Returns: | CIE XYZ colourspace matrix.
  Return type: | ndarray, (3,)

  Notes

  - Input CIE UCS colourspace matrix is in domain [0, 1].
  - Output CIE XYZ colourspace matrix is in domain [0, 1].

  References

  [3] | http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIEXYZ (Last accessed 24 February 2014)

  Examples

      >>> UCS = np.array([0.07870556, 0.1034, 0.12182529])
      >>> UCS_to_XYZ(UCS)
      array([ 0.1180583...,  0.1034    ,  0.0515089...])

`colour.models.cie_ucs.` `UCS_to_uv`(UVW)

  Returns the uv chromaticity coordinates from given CIE UCS colourspace matrix.

  Parameters: | UVW (array_like, (3,)) – CIE UCS colourspace matrix.
  Returns: | uv chromaticity coordinates.
  Return type: | tuple

  Notes

  - Input CIE UCS colourspace matrix is in domain [0, 1].
  - Output uv chromaticity coordinates are in domain [0, 1].

  References

  [4] | http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIEXYZ (Last accessed 24 February 2014)

  Examples

      >>> UCS = np.array([0.1180583421, 0.1034, 0.0515089229])
      >>> UCS_to_uv(UCS)
      (0.4324999..., 0.3788000...)

`colour.models.cie_ucs.` `UCS_uv_to_xy`(uv)

  Returns the xy chromaticity coordinates from given CIE UCS colourspace uv chromaticity coordinates.

  Parameters: | uv (array_like) – CIE UCS uv chromaticity coordinates.
  Returns: | xy chromaticity coordinates.
  Return type: | tuple

  Notes

  - Input uv chromaticity coordinates are in domain [0, 1].
  - Output xy chromaticity coordinates are in domain [0, 1].

  References

  [5] | http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIEXYZ (Last accessed 24 February 2014)

  Examples

      >>> uv = (0.43249999995420696, 0.378800000065942)
      >>> UCS_uv_to_xy(uv)
      (0.7072386..., 0.4129510...)