colour.models.deprecated Module

Deprecated Colour Models Transformations

Defines various deprecated colour models transformations:

These colour models are stated as deprecated because they trade off perceptual relevance for computation speed. They should not be used in the colour science domain although they are useful for image analysis and provide end user software colour selection tools.

They are provided for convenience and completeness.

Warning

Don’t use that! Seriously...

References

[1]Wikipedia. (n.d.). HSL and HSV. Retrieved September 10, 2014, from http://en.wikipedia.org/wiki/HSL_and_HSV
[2]Smith, A. R. (1978). Color Gamut Transform Pairs. In Proceedings of the 5th Annual Conference on Computer Graphics and Interactive Techniques (pp. 12–19). New York, NY, USA: ACM. doi:10.1145/800248.807361
colour.models.deprecated.RGB_to_HSV(RGB)[source]

Converts from RGB colourspace to HSV colourspace.

Parameters:RGB (array_like) – RGB colourspace array.
Returns:HSV array.
Return type:ndarray

Notes

  • Input RGB colourspace array is in domain [0, 1].
  • Output HSV colourspace array is in domain [0, 1].

References

[3]EasyRGB. (n.d.). RGB —> HSV. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=20#text20

Examples

>>> RGB = np.array([0.49019608, 0.98039216, 0.25098039])
>>> RGB_to_HSV(RGB)  
array([ 0.2786738...,  0.744     ,  0.98039216])
colour.models.deprecated.HSV_to_RGB(HSV)[source]

Converts from HSV colourspace to RGB colourspace.

Parameters:HSV (array_like) – HSV colourspace array.
Returns:RGB colourspace array.
Return type:ndarray

Notes

  • Input HSV colourspace array is in domain [0, 1].
  • Output RGB colourspace array is in domain [0, 1].

References

[4]EasyRGB. (n.d.). HSV —> RGB. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=21#text21

Examples

>>> HSV = np.array([0.27867384, 0.74400000, 0.98039216])
>>> HSV_to_RGB(HSV)  
array([ 0.4901960...,  0.9803921...,  0.2509803...])
colour.models.deprecated.RGB_to_HSL(RGB)[source]

Converts from RGB colourspace to HSL colourspace.

Parameters:RGB (array_like) – RGB colourspace array.
Returns:HSL array.
Return type:ndarray

Notes

  • Input RGB colourspace array is in domain [0, 1].
  • Output HSL colourspace array is in domain [0, 1].

References

[5]EasyRGB. (n.d.). RGB —> HSL. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=18#text18

Examples

>>> RGB = np.array([0.49019608, 0.98039216, 0.25098039])
>>> RGB_to_HSL(RGB)  
array([ 0.2786738...,  0.9489796...,  0.6156862...])
colour.models.deprecated.HSL_to_RGB(HSL)[source]

Converts from HSL colourspace to RGB colourspace.

Parameters:HSL (array_like) – HSL colourspace array.
Returns:RGB colourspace array.
Return type:ndarray

Notes

  • Input HSL colourspace array is in domain [0, 1].
  • Output RGB colourspace array is in domain [0, 1].

References

[6]EasyRGB. (n.d.). HSL —> RGB. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=19#text19

Examples

>>> HSL = np.array([0.27867384, 0.94897959, 0.61568627])
>>> HSL_to_RGB(HSL)  
array([ 0.4901960...,  0.9803921...,  0.2509803...])
colour.models.deprecated.RGB_to_CMY(RGB)[source]

Converts from RGB colourspace to CMY colourspace.

Parameters:RGB (array_like) – RGB colourspace array.
Returns:CMY array.
Return type:ndarray

Notes

  • Input RGB colourspace array is in domain [0, 1].
  • Output CMY colourspace array is in domain [0, 1].

References

[7]EasyRGB. (n.d.). RGB —> CMY. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=11#text11

Examples

>>> RGB = np.array([0.49019608, 0.98039216, 0.25098039])
>>> RGB_to_CMY(RGB)  
array([ 0.5098039...,  0.0196078...,  0.7490196...])
colour.models.deprecated.CMY_to_RGB(CMY)[source]

Converts from CMY colourspace to CMY colourspace.

Parameters:CMY (array_like) – CMY colourspace array.
Returns:RGB colourspace array.
Return type:ndarray

Notes

  • Input CMY colourspace array is in domain [0, 1].
  • Output RGB colourspace array is in domain [0, 1].

References

[8]EasyRGB. (n.d.). CMY —> RGB. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=12#text12

Examples

>>> CMY = np.array([0.50980392, 0.01960784, 0.74901961])
>>> CMY_to_RGB(CMY)  
array([ 0.4901960...,  0.9803921...,  0.2509803...])
colour.models.deprecated.CMY_to_CMYK(CMY)[source]

Converts from CMY colourspace to CMYK colourspace.

Parameters:CMY (array_like) – CMY colourspace array.
Returns:CMYK array.
Return type:ndarray

Notes

  • Input CMY colourspace array is in domain [0, 1].
  • Output*CMYK* colourspace array is in domain [0, 1].

References

[9]EasyRGB. (n.d.). CMY —> CMYK. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=13#text13

Examples

>>> CMY = np.array([0.50980392, 0.01960784, 0.74901961])
>>> CMY_to_CMYK(CMY)  
array([ 0.5       ,  0.        ,  0.744     ,  0.0196078...])
colour.models.deprecated.CMYK_to_CMY(CMYK)[source]

Converts from CMYK colourspace to CMY colourspace.

Parameters:CMYK (array_like) – CMYK colourspace array.
Returns:CMY array.
Return type:ndarray

Notes

  • Input CMYK colourspace array is in domain [0, 1].
  • Output CMY colourspace array is in domain [0, 1].

References

[10]EasyRGB. (n.d.). CMYK —> CMY. Retrieved May 18, 2014, from http://www.easyrgb.com/index.php?X=MATH&H=14#text14

Examples

>>> CMYK = np.array([0.50000000, 0.00000000, 0.74400000, 0.01960784])
>>> CMYK_to_CMY(CMYK)  
array([ 0.5098039...,  0.0196078...,  0.7490196...])