Defines the RGB_Colourspace class for the RGB colourspaces dataset from colour.models.dataset.aces_rgb, etc... and the following RGB colourspace transformations:
See also
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.__primaries private attribute.
Returns: | self.__primaries. |
---|---|
Return type: | array_like, (3, 2) |
Converts from CIE XYZ colourspace to RGB colourspace using given CIE XYZ colourspace matrix, illuminants, chromatic adaptation method, normalised primary matrix and transfer function.
Parameters: |
|
---|---|
Returns: | RGB colourspace matrix. |
Return type: | ndarray, (3,) |
Notes
Examples
>>> XYZ = np.array([0.07049534, 0.1008, 0.09558313])
>>> illuminant_XYZ = (0.34567, 0.35850)
>>> illuminant_RGB = (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.2040112, 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 RGB colourspace to CIE XYZ colourspace using given RGB colourspace matrix, illuminants, chromatic adaptation method, normalised primary matrix and transfer function.
Parameters: |
|
---|---|
Returns: | CIE XYZ colourspace matrix. |
Return type: | ndarray, (3,) |
Notes
Examples
>>> RGB = np.array([0.01103604, 0.12734466, 0.11631037])
>>> illuminant_RGB = (0.31271, 0.32902)
>>> illuminant_XYZ = (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.0721802],
... [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...])