On this page |
Color conversions ¶
Transforms between color spaces.
vector ctransform(string fromspace, string tospace, vector clr)
vector ctransform(string tospace, vector clr)
Convert HSV color space into RGB color space.
vector hsvtorgb(vector hsv)
vector hsvtorgb(float hue, float sat, float val)
Compute the luminance of the RGB color specified by the parameters.
float luminance(vector rgb)
float luminance(vector4 rgb)
float luminance(float r, float g, float b)
Convert RGB color space to HSV color space.
vector rgbtohsv(vector rgb)
vector rgbtohsv(float r, float g, float b)
Convert a linear sRGB triplet to CIE XYZ tristimulus values.
vector rgbtoxyz(vector rgb)
Convert CIE XYZ tristimulus values to a linear sRGB triplet.
vector xyztorgb(vector xyz)
Open Color IO ¶
Returns the names of active displays supported in Open Color IO
string [] ocio_activedisplays()
Returns the names of active views supported in Open Color IO
string [] ocio_activeviews()
Imports attributes from OpenColorIO spaces.
int ocio_import(string space, string property, int &value)
int ocio_import(string space, string property, vector &value)
int ocio_import(string space, string property, string &value)
Parse the color space from a string
string ocio_parsecolorspace(string input)
Use OCIO to detect the color space in an input string. The input string is typically a filename.
input
The string to scan for a color space string. This is typically an image filename that has the color space encoded in the name.
Returns the names of roles supported in Open Color IO
string [] ocio_roles()
Returns the names of color spaces supported in Open Color IO.
string [] ocio_spaces()
Transform colors using Open Color IO
vector ocio_transform(string dest, vector clr)
vector ocio_transform(string src, string dest, vector clr)
vector ocio_transform(string src, string dest, string looks, vector clr)
Transform a three-component color into a new color space.
vector4 ocio_transform(string dest, vector4 clr)
vector4 ocio_transform(string src, string dest, vector4 clr)
vector4 ocio_transform(string src, string dest, string looks, vector4 clr)
Transform a four-component color into a new color space.
src
The name of the color space to transform from. If this is not given, the function assumes the space assigned to "data"
.
dest
The name of the color space to transform to.
looks
A comma separated list of color gradings (also known as “looks”).
clr
The color to transform.
Transform colors to a view using Open Color IO
vector ocio_transformview(string src, string display, string view, vector clr)
Transform a three-component color into a new view.
vector4 ocio_transformview(string src, string display, string view, vector4 clr)
Transform a four-component color into a new view.
src
The name of the color space to transform from.
display
The name of the Display containing the desired View.
view
The View to use as the destination to transform to.
clr
The color to transform.
Utility functions ¶
Compute the color value of an incandescent black body.
vector blackbody(float temperature, float luminance)
Transforms between color spaces.
vector ctransform(string fromspace, string tospace, vector clr)
vector ctransform(string tospace, vector clr)
Compute the luminance of the RGB color specified by the parameters.
float luminance(vector rgb)
float luminance(vector4 rgb)
float luminance(float r, float g, float b)