Converts from CIE XYZ tristimulus values to CIE xyY colourspace and reference illuminant.
Parameters: |
|
---|---|
Returns: | CIE xyY colourspace array. |
Return type: | ndarray |
Notes
References
[2] | Lindbloom, B. (2003). XYZ to xyY. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html |
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_xyY(XYZ)
array([ 0.2641477..., 0.3777000..., 0.1008 ])
Converts from CIE xyY colourspace to CIE XYZ tristimulus values.
Parameters: | xyY (array_like) – CIE xyY colourspace array. |
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
References
[3] | Lindbloom, B. (2009). xyY to XYZ. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html |
Examples
>>> xyY = np.array([0.26414772, 0.37770001, 0.10080000])
>>> xyY_to_XYZ(xyY)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Converts from xy chromaticity coordinates to CIE xyY colourspace by extending the array last dimension with \(Y\) Luminance.
xy argument with last dimension being equal to 3 will be assumed to be a CIE xyY colourspace array argument and will be returned directly by the definition.
Parameters: |
|
---|---|
Returns: | CIE xyY colourspace array. |
Return type: | ndarray |
See also
Notes
Examples
>>> xy = np.array([0.26414772, 0.37770001])
>>> xy_to_xyY(xy)
array([ 0.2641477..., 0.3777000..., 1. ])
>>> xy = np.array([0.26414772, 0.37770001, 0.10080000])
>>> xy_to_xyY(xy)
array([ 0.2641477..., 0.3777000..., 0.1008...])
>>> xy = np.array([0.26414772, 0.37770001])
>>> xy_to_xyY(xy, 100)
array([ 0.2641477..., 0.3777000..., 100. ])
Converts from CIE xyY colourspace to xy chromaticity coordinates.
xyY argument with last dimension being equal to 2 will be assumed to be a xy chromaticity coordinates argument and will be returned directly by the definition.
Parameters: | xyY (array_like) – CIE xyY colourspace array or xy chromaticity coordinates. |
---|---|
Returns: | xy chromaticity coordinates. |
Return type: | ndarray |
See also
Notes
Examples
>>> xyY = np.array([0.26414772, 0.37770001, 0.10080000])
>>> xyY_to_xy(xyY)
array([ 0.2641477..., 0.3777000...])
>>> xy = np.array([0.26414772, 0.37770001])
>>> xyY_to_xy(xy)
array([ 0.2641477..., 0.3777000...])
Returns the CIE XYZ tristimulus values from given xy chromaticity coordinates.
Parameters: | xy (array_like) – xy chromaticity coordinates. |
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
Examples
>>> xy = np.array([0.26414772236966133, 0.37770000704815188])
>>> xy_to_XYZ(xy)
array([ 0.6993585..., 1. , 0.9482453...])
Returns the xy chromaticity coordinates from given CIE XYZ tristimulus values.
Parameters: |
|
---|---|
Returns: | xy chromaticity coordinates. |
Return type: | ndarray |
Notes
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_xy(XYZ)
array([ 0.2641477..., 0.3777000...])
Bases: object
Implements support for the RGB colourspaces dataset from colour.models.dataset.aces_rgb, etc....
Parameters: |
|
---|
Property for self.__to_XYZ private attribute.
Returns: | self.__to_XYZ. |
---|---|
Return type: | array_like, (3, 3) |
Property for self.__to_RGB private attribute.
Returns: | self.__to_RGB. |
---|---|
Return type: | array_like, (3, 3) |
Property for self.__illuminant private attribute.
Returns: | self.__illuminant. |
---|---|
Return type: | unicode |
Property for self.__inverse_transfer_function private attribute.
Returns: | self.__inverse_transfer_function. |
---|---|
Return type: | object |
Property for self.__name private attribute.
Returns: | self.__name. |
---|---|
Return type: | unicode |
Property for self.__primaries private attribute.
Returns: | self.__primaries. |
---|---|
Return type: | array_like, (3, 2) |
Property for self.__transfer_function private attribute.
Returns: | self.__transfer_function. |
---|---|
Return type: | object |
Property for self.__whitepoint private attribute.
Returns: | self.__whitepoint. |
---|---|
Return type: | array_like |
Returns the normalised primary matrix using given primaries and whitepoint.
Parameters: |
|
---|---|
Returns: | Normalised primary matrix. |
Return type: | ndarray, (3, 3) |
Examples
>>> pms = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
>>> whitepoint = np.array([0.32168, 0.33767])
>>> normalised_primary_matrix(pms, whitepoint)
array([[ 9.5255239...e-01, 0.0000000...e+00, 9.3678631...e-05],
[ 3.4396645...e-01, 7.2816609...e-01, -7.2132546...e-02],
[ 0.0000000...e+00, 0.0000000...e+00, 1.0088251...e+00]])
Returns primaries and whitepoint using given normalised primary matrix.
Parameters: | npm (array_like, (3, 3)) – Normalised primary matrix. |
---|---|
Returns: | Primaries and whitepoint. |
Return type: | tuple |
References
[2] | Trieu, T. (2015). Private Discussion with Mansencal, T. |
Examples
>>> npm = np.array([[9.52552396e-01, 0.00000000e+00, 9.36786317e-05],
... [3.43966450e-01, 7.28166097e-01, -7.21325464e-02],
... [0.00000000e+00, 0.00000000e+00, 1.00882518e+00]])
>>> p, w = primaries_whitepoint(npm)
>>> p
array([[ 7.3470000...e-01, 2.6530000...e-01],
[ 0.0000000...e+00, 1.0000000...e+00],
[ 1.0000000...e-04, -7.7000000...e-02]])
>>> w
array([ 0.32168, 0.33767])
Returns the luminance equation from given primaries and whitepoint.
Parameters: |
|
---|---|
Returns: | Luminance equation. |
Return type: | unicode |
Examples
>>> pms = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
>>> whitepoint = np.array([0.32168, 0.33767])
>>> # Doctests skip for Python 2.x compatibility.
>>> RGB_luminance_equation(pms, whitepoint)
'Y = 0.3439664...(R) + 0.7281660...(G) + -0.0721325...(B)'
Returns the luminance \(Y\) of given RGB components from given primaries and whitepoint.
Parameters: |
|
---|---|
Returns: | Luminance \(Y\). |
Return type: | numeric or ndarray |
Examples
>>> RGB = np.array([40.6, 4.2, 67.4])
>>> pms = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
>>> whitepoint = np.array([0.32168, 0.33767])
>>> RGB_luminance(RGB, pms, whitepoint)
12.1616018...
Converts from CIE XYZ tristimulus values to CIE Lab colourspace.
Parameters: |
|
---|---|
Returns: | CIE Lab colourspace array. |
Return type: | ndarray |
Notes
References
[2] | Lindbloom, B. (2003). XYZ to Lab. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_XYZ_to_Lab.html |
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_Lab(XYZ)
array([ 37.9856291..., -23.6230288..., -4.4141703...])
Converts from CIE Lab colourspace to CIE XYZ tristimulus values.
Parameters: |
|
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
References
[3] | Lindbloom, B. (2008). Lab to XYZ. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_Lab_to_XYZ.html |
Examples
>>> Lab = np.array([37.98562910, -23.62302887, -4.41417036])
>>> Lab_to_XYZ(Lab)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Converts from CIE Lab colourspace to CIE LCHab colourspace.
Parameters: | Lab (array_like) – CIE Lab colourspace array. |
---|---|
Returns: | CIE LCHab colourspace array. |
Return type: | ndarray |
Notes
References
[4] | Lindbloom, B. (2007). Lab to LCH(ab). Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_Lab_to_LCH.html |
Examples
>>> Lab = np.array([37.98562910, -23.62302887, -4.41417036])
>>> Lab_to_LCHab(Lab)
array([ 37.9856291..., 24.0319036..., 190.5841597...])
Converts from CIE LCHab colourspace to CIE Lab colourspace.
Parameters: | LCHab (array_like) – CIE LCHab colourspace array. |
---|---|
Returns: | CIE Lab colourspace array. |
Return type: | ndarray |
Notes
References
[5] | Lindbloom, B. (2006). LCH(ab) to Lab. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_LCH_to_Lab.html |
Examples
>>> LCHab = np.array([37.98562910, 24.03190365, 190.58415972])
>>> LCHab_to_Lab(LCHab)
array([ 37.9856291..., -23.6230288..., -4.4141703...])
Converts from CIE XYZ tristimulus values to CIE Luv colourspace.
Parameters: |
|
---|---|
Returns: | CIE Luv colourspace array. |
Return type: | ndarray |
Notes
References
[2] | Lindbloom, B. (2003). XYZ to Luv. Retrieved February 24, 2014, from http://brucelindbloom.com/Eqn_XYZ_to_Luv.html |
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_Luv(XYZ)
array([ 37.9856291..., -28.7922944..., -1.3558195...])
Converts from CIE Luv colourspace to CIE XYZ tristimulus values.
Parameters: |
|
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
References
[3] | Lindbloom, B. (2003). Luv to XYZ. Retrieved February 24, 2014, from http://brucelindbloom.com/Eqn_Luv_to_XYZ.html |
Examples
>>> Luv = np.array([37.98562910, -28.79229446, -1.35581950])
>>> Luv_to_XYZ(Luv)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Returns the \(uv^p\) chromaticity coordinates from given CIE Luv colourspace array.
Parameters: |
|
---|---|
Returns: | \(uv^p\) chromaticity coordinates. |
Return type: | ndarray |
Notes
References
[4] | Wikipedia. (n.d.). The forward transformation. Retrieved February 24, 2014, from http://en.wikipedia.org/wiki/CIELUV#The_forward_transformation |
Examples
>>> Luv = np.array([37.98562910, -28.79229446, -1.35581950])
>>> Luv_to_uv(Luv)
array([ 0.1508531..., 0.4853297...])
Returns the xy chromaticity coordinates from given CIE Luv colourspace \(uv^p\) chromaticity coordinates.
Parameters: | uv (array_like) – CIE Luv u”v” chromaticity coordinates. |
---|---|
Returns: | xy chromaticity coordinates. |
Return type: | ndarray |
Notes
References
[5] | Wikipedia. (n.d.). The reverse transformation. Retrieved from http://en.wikipedia.org/wiki/CIELUV#The_reverse_transformation |
Examples
>>> uv = np.array([0.15085309882985695, 0.48532970854318019])
>>> Luv_uv_to_xy(uv)
array([ 0.2641477..., 0.3777000...])
Converts from CIE Luv colourspace to CIE LCHuv colourspace.
Parameters: | Luv (array_like) – CIE Luv colourspace array. |
---|---|
Returns: | CIE LCHuv colourspace array. |
Return type: | ndarray |
Notes
References
[6] | Lindbloom, B. (2003). Luv to LCH(uv). Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_Luv_to_LCH.html |
Examples
>>> Luv = np.array([37.98562910, -28.79229446, -1.35581950])
>>> Luv_to_LCHuv(Luv)
array([ 37.9856291..., 28.8241993..., 182.6960474...])
Converts from CIE LCHuv colourspace to CIE Luv colourspace.
Parameters: | LCHuv (array_like) – CIE LCHuv colourspace array. |
---|---|
Returns: | CIE Luv colourspace array. |
Return type: | ndarray |
Notes
References
[7] | Lindbloom, B. (2006). LCH(uv) to Luv. Retrieved February 24, 2014, from http://www.brucelindbloom.com/Eqn_LCH_to_Luv.html |
Examples
>>> LCHuv = np.array([37.98562910, 28.82419933, 182.69604747])
>>> LCHuv_to_Luv(LCHuv)
array([ 37.9856291..., -28.7922944..., -1.3558195...])
Converts from CIE XYZ tristimulus values to CIE UCS colourspace.
Parameters: | XYZ (array_like) – CIE XYZ tristimulus values. |
---|---|
Returns: | CIE UCS colourspace array. |
Return type: | ndarray |
Notes
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_UCS(XYZ)
array([ 0.0469968..., 0.1008 , 0.1637439...])
Converts from CIE UCS colourspace to CIE XYZ tristimulus values.
Parameters: | UVW (array_like) – CIE UCS colourspace array. |
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
Examples
>>> UVW = np.array([0.04699689, 0.10080000, 0.16374390])
>>> UCS_to_XYZ(UVW)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Returns the uv chromaticity coordinates from given CIE UCS colourspace array.
Parameters: | UVW (array_like) – CIE UCS colourspace array. |
---|---|
Returns: | uv chromaticity coordinates. |
Return type: | ndarray |
Notes
Examples
>>> UCS = np.array([0.04699689, 0.10080000, 0.16374390])
>>> UCS_to_uv(UCS)
array([ 0.1508530..., 0.3235531...])
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: | ndarray |
Notes
Examples
>>> uv = np.array([0.15085308732766581, 0.3235531372954405])
>>> UCS_uv_to_xy(uv)
array([ 0.2641477..., 0.3777000...])
Converts from CIE XYZ tristimulus values to CIE 1964 U*V*W* colourspace.
Parameters: |
|
---|---|
Returns: | CIE 1964 U*V*W* colourspace array. |
Return type: | ndarray |
Notes
Warning
The input / output domains of that definition are non standard!
Examples
>>> import numpy as np
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) * 100
>>> XYZ_to_UVW(XYZ)
array([-28.0483277..., -0.8805242..., 37.0041149...])
Converts from CIE XYZ tristimulus values to IPT colourspace.
Parameters: | XYZ (array_like) – CIE XYZ tristimulus values. |
---|---|
Returns: | IPT colourspace array. |
Return type: | ndarray |
Notes
Examples
>>> XYZ = np.array([0.96907232, 1, 1.12179215])
>>> XYZ_to_IPT(XYZ)
array([ 1.0030082..., 0.0190691..., -0.0136929...])
Converts from IPT colourspace to CIE XYZ tristimulus values.
Parameters: | IPT (array_like) – IPT colourspace array. |
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Examples
>>> IPT = np.array([1.00300825, 0.01906918, -0.01369292])
>>> IPT_to_XYZ(IPT)
array([ 0.9690723..., 1. , 1.1217921...])
Computes the hue angle from IPT colourspace.
Parameters: | IPT (array_like) – IPT colourspace array. |
---|---|
Returns: | Hue angle. |
Return type: | numeric or ndarray |
Examples
>>> IPT = np.array([0.96907232, 1, 1.12179215])
>>> IPT_hue_angle(IPT)
0.8427358...
Converts from linear to log using given method.
Parameters: |
|
---|---|
Returns: | Log value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_log(0.18)
0.4573196...
>>> linear_to_log(0.18, method='ACEScc')
array(0.4135884...)
>>> linear_to_log(
... 0.18, method='PLog', log_reference=400)
0.3910068...
>>> linear_to_log(0.18, method='S-Log')
0.3599878...
Converts from log to linear using given method.
Parameters: |
|
---|---|
Returns: | Log value. |
Return type: | numeric or ndarray |
Examples
>>> log_to_linear(0.45731961308541841)
0.18...
>>> log_to_linear(0.41358840249244228, method='ACEScc')
array(0.18...)
>>> log_to_linear(
... 0.39100684261974583, method='PLog', log_reference=400)
0.1...
>>> log_to_linear(
... 0.35998784642215442, method='S-Log')
0.1799999...
Defines the linear to Cineon conversion function.
Parameters: |
|
---|---|
Returns: | Cineon value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_cineon(0.18)
0.4573196...
Defines the Cineon to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> cineon_to_linear(0.45731961308541841)
0.18...
Defines the linear to Panalog conversion function.
Parameters: |
|
---|---|
Returns: | Panalog value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_panalog(0.18)
0.3745767...
Defines the Panalog to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> panalog_to_linear(0.37457679138229816)
0.1...
Defines the linear to REDLogFilm conversion function.
Parameters: |
|
---|---|
Returns: | REDLogFilm value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_red_log_film(0.18)
0.6376218...
Defines the REDLogFilm to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> red_log_film_to_linear(0.63762184598817484)
0.1...
Defines the linear to ViperLog conversion function.
Parameters: |
|
---|---|
Returns: | ViperLog value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_viper_log(0.18)
0.6360080...
Defines the ViperLog to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> viper_log_to_linear(0.63600806701041346)
0.1799999...
Defines the linear to Josh Pines style pivoted log conversion function.
Parameters: |
|
---|---|
Returns: | Josh Pines style pivoted log value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_pivoted_log(0.18)
0.4349951...
Defines the Josh Pines style pivoted log to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> pivoted_log_to_linear(0.43499511241446726)
0.1...
Defines the linear to Canon Log conversion function.
Parameters: |
|
---|---|
Returns: | Canon Log value. |
Return type: | numeric or ndarray |
References
[2] | Thorpe, L. (2012). CANON-LOG TRANSFER CHARACTERISTIC. Retrieved from http://downloads.canon.com/CDLC/Canon-Log_Transfer_Characteristic_6-20-2012.pdf |
Examples
>>> linear_to_c_log(0.20) * 100
32.7953896...
Defines the Canon Log to linear conversion function. [2]_
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> c_log_to_linear(32.795389693580908 / 100)
0.19999999...
Defines the linear to ACEScc conversion function.
Parameters: |
|
---|---|
Returns: | ACEScc value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_aces_cc(0.18)
array(0.4135884...)
Defines the ACEScc to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> aces_cc_to_linear(0.41358840249244228)
array(0.1800000...)
Defines the linear to ALEXA Log C conversion function.
Parameters: |
|
---|---|
Returns: | ALEXA Log C value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_alexa_log_c(0.18)
array(0.3910068...)
Defines the ALEXA Log C to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> alexa_log_c_to_linear(0.39100683203408376)
array(0.1800000...)
Defines the linear to S-Log conversion function.
Parameters: |
|
---|---|
Returns: | S-Log value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_s_log(0.18)
0.3599878...
Defines the linear to DCI-P3 conversion function.
Parameters: |
|
---|---|
Returns: | DCI-P3 value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_dci_p3_log(0.18)
461.9922059...
Defines the DCI-P3 to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> dci_p3_log_to_linear(461.99220597484737)
0.1800000...
Defines the S-Log to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> s_log_to_linear(0.35998784642215442)
0.1...
Defines the linear to S-Log2 conversion function.
Parameters: |
|
---|---|
Returns: | S-Log2 value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_s_log2(0.18)
0.3849708...
Defines the S-Log2 to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> s_log2_to_linear(0.38497081592867027)
0.1...
Defines the linear to S-Log3 conversion function.
Parameters: |
|
---|---|
Returns: | S-Log3 value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_s_log3(0.18)
array(0.4105571...)
Defines the S-Log3 to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> s_log3_to_linear(0.41055718475073316)
array(0.1...)
Defines the linear to V-Log conversion function.
Parameters: |
|
---|---|
Returns: | V-Log value. |
Return type: | numeric or ndarray |
Examples
>>> linear_to_v_log(0.18)
array(0.4233114...)
Defines the V-Log to linear conversion function.
Parameters: |
|
---|---|
Returns: | Linear value. |
Return type: | numeric or ndarray |
Examples
>>> v_log_to_linear(0.42331144876013616)
array(0.1...)
Converts from CIE XYZ tristimulus values to given RGB colourspace.
Parameters: |
|
---|---|
Returns: | RGB colourspace array. |
Return type: | ndarray |
Notes
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> illuminant_XYZ = np.array([0.34567, 0.35850])
>>> illuminant_RGB = np.array([0.31271, 0.32902])
>>> chromatic_adaptation_transform = 'Bradford'
>>> XYZ_to_RGB_matrix = np.array([
... [3.24100326, -1.53739899, -0.49861587],
... [-0.96922426, 1.87592999, 0.04155422],
... [0.05563942, -0.20401120, 1.05714897]])
>>> XYZ_to_RGB(
... XYZ,
... illuminant_XYZ,
... illuminant_RGB,
... XYZ_to_RGB_matrix,
... chromatic_adaptation_transform)
array([ 0.0110360..., 0.1273446..., 0.1163103...])
Converts from given RGB colourspace to CIE XYZ tristimulus values.
Parameters: |
|
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
Examples
>>> RGB = np.array([0.01103604, 0.12734466, 0.11631037])
>>> illuminant_RGB = np.array([0.31271, 0.32902])
>>> illuminant_XYZ = np.array([0.34567, 0.35850])
>>> chromatic_adaptation_transform = 'Bradford'
>>> RGB_to_XYZ_matrix = np.array([
... [0.41238656, 0.35759149, 0.18045049],
... [0.21263682, 0.71518298, 0.07218020],
... [0.01933062, 0.11919716, 0.95037259]])
>>> RGB_to_XYZ(
... RGB,
... illuminant_RGB,
... illuminant_XYZ,
... RGB_to_XYZ_matrix,
... chromatic_adaptation_transform)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Converts from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.
Parameters: |
|
---|
Notes
Examples
>>> from colour import sRGB_COLOURSPACE, PROPHOTO_RGB_COLOURSPACE
>>> RGB = np.array([0.01103604, 0.12734466, 0.11631037])
>>> RGB_to_RGB(
... RGB,
... sRGB_COLOURSPACE,
... PROPHOTO_RGB_COLOURSPACE)
array([ 0.0643338..., 0.1157362..., 0.1157614...])
Converts from CIE XYZ tristimulus values to sRGB colourspace.
Parameters: |
|
---|---|
Returns: | sRGB colour array. |
Return type: | ndarray |
Notes
Examples
>>> import numpy as np
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_sRGB(XYZ)
array([ 0.1750135..., 0.3881879..., 0.3216195...])
Converts from sRGB colourspace to CIE XYZ tristimulus values.
Parameters: |
|
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Notes
Examples
>>> import numpy as np
>>> RGB = np.array([0.17501358, 0.38818795, 0.32161955])
>>> sRGB_to_XYZ(RGB)
array([ 0.0704953..., 0.1008 , 0.0955831...])
Converts given spectral power distribution to ACES2065-1 colourspace relative exposure values.
Parameters: |
|
---|---|
Returns: | ACES2065-1 colourspace relative exposure values array. |
Return type: | ndarray, (3,) |
Notes
References
Examples
>>> from colour import COLOURCHECKERS_SPDS
>>> spd = COLOURCHECKERS_SPDS['ColorChecker N Ohta']['dark skin']
>>> spectral_to_aces_relative_exposure_values(spd)
array([ 0.1187697..., 0.0870866..., 0.0589442...])