colour.models.cie_luv Module

CIE Luv Colourspace

Defines the CIE Luv colourspace transformations:

References

[1]http://en.wikipedia.org/wiki/CIELUV (Last accessed 24 February 2014)
colour.models.cie_luv.XYZ_to_Luv(XYZ, illuminant=(0.34567, 0.3585))[source]

Converts from CIE XYZ colourspace to CIE Luv colourspace.

Parameters:
  • XYZ (array_like, (3,)) – CIE XYZ colourspace matrix.
  • illuminant (array_like, optional) – Reference illuminant chromaticity coordinates.
Returns:

CIE Luv colourspace matrix.

Return type:

ndarray, (3,)

Notes

  • Input CIE XYZ colourspace matrix is in domain [0, 1].
  • Input illuminant chromaticity coordinates are in domain [0, 1].
  • Output \(L^*\) is in domain [0, 100].

References

[2]http://brucelindbloom.com/Eqn_XYZ_to_Luv.html (Last accessed 24 February 2014)

Examples

>>> XYZ_to_Luv(np.array([0.92193107, 1, 1.03744246]))  
array([ 100.        ,  -20.0430424...,  -19.8167603...])
colour.models.cie_luv.Luv_to_XYZ(Luv, illuminant=(0.34567, 0.3585))[source]

Converts from CIE Luv colourspace to CIE XYZ colourspace.

Parameters:
  • Luv (array_like, (3,)) – CIE Luv colourspace matrix.
  • illuminant (array_like, optional) – Reference illuminant chromaticity coordinates.
Returns:

CIE XYZ colourspace matrix.

Return type:

ndarray, (3,)

Notes

  • Input \(L^*\) is in domain [0, 100].
  • Input illuminant chromaticity coordinates are in domain [0, 1].
  • Output CIE XYZ colourspace matrix is in domain [0, 1].

References

[3]http://brucelindbloom.com/Eqn_Luv_to_XYZ.html (Last accessed 24 February 2014)

Examples

>>> Luv = np.array([100, -20.04304247, -19.81676035])
>>> Luv_to_XYZ(Luv)  
array([ 0.9219310...,  1.        ,  1.0374424...])
colour.models.cie_luv.Luv_to_uv(Luv, illuminant=(0.34567, 0.3585))[source]

Returns the u”v” chromaticity coordinates from given CIE Luv colourspace matrix.

Parameters:
  • Luv (array_like, (3,)) – CIE Luv colourspace matrix.
  • illuminant (array_like, optional) – Reference illuminant chromaticity coordinates.
Returns:

u”v” chromaticity coordinates.

Return type:

tuple

Notes

  • Input \(L^*\) is in domain [0, 100].
  • Output u”v” chromaticity coordinates are in domain [0, 1].

References

[4]http://en.wikipedia.org/wiki/CIELUV#The_forward_transformation (Last accessed 24 February 2014)

Examples

>>> Luv = np.array([100, -20.04304247, -19.81676035])
>>> Luv_to_uv(Luv)  
(0.1937414..., 0.4728316...)
colour.models.cie_luv.Luv_uv_to_xy(uv)[source]

Returns the xy chromaticity coordinates from given CIE Luv colourspace u”v” chromaticity coordinates.

Parameters:uv (array_like) – CIE Luv u”v” chromaticity coordinates.
Returns:xy chromaticity coordinates.
Return type:tuple

Notes

  • Input u”v” chromaticity coordinates are in domain [0, 1].
  • Output xy is in domain [0, 1].

References

[5]http://en.wikipedia.org/wiki/CIELUV#The_reverse_transformation (Last accessed 24 February 2014)

Examples

>>> uv = (0.2033733344733139, 0.3140500001549052)
>>> Luv_uv_to_xy(uv)  
(0.2233388..., 0.1532803...)
colour.models.cie_luv.Luv_to_LCHuv(Luv)[source]

Converts from CIE Luv colourspace to CIE LCHuv colourspace.

Parameters:Luv (array_like, (3,)) – CIE Luv colourspace matrix.
Returns:CIE LCHuv colourspace matrix.
Return type:ndarray, (3,)

Notes

  • \(L^*\) is in domain [0, 100].

References

[6]http://www.brucelindbloom.com/Eqn_Luv_to_LCH.html (Last accessed 24 February 2014)

Examples

>>> Luv = np.array([100, -20.04304247, -19.81676035])
>>> Luv_to_LCHuv(Luv)  
array([ 100.        ,   28.1855910...,  224.6747382...])
colour.models.cie_luv.LCHuv_to_Luv(LCHuv)[source]

Converts from CIE LCHuv colourspace to CIE Luv colourspace.

Parameters:LCHuv (array_like, (3,)) – CIE LCHuv colourspace matrix.
Returns:CIE Luv colourspace matrix.
Return type:ndarray, (3,)

Notes

  • \(L^*\) is in domain [0, 100].

References

[7]http://www.brucelindbloom.com/Eqn_LCH_to_Luv.html (Last accessed 24 February 2014)

Examples

>>> LCHuv = np.array([100, 28.18559104, 224.6747382])
>>> LCHuv_to_Luv(LCHuv)  
array([ 100.        ,  -20.0430424...,  -19.8167603...])