Houdini 18.0 VEX

Color functions

On this page

Color conversions

ctransform

Transforms between color spaces.

vector  ctransform(string fromspace, string tospace, vector clr)

vector  ctransform(string tospace, vector clr)

hsvtorgb

Convert HSV color space into RGB color space.

vector  hsvtorgb(vector hsv)

vector  hsvtorgb(float hue, float sat, float val)

luminance

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)

rgbtohsv

Convert RGB color space to HSV color space.

vector  rgbtohsv(vector hsv)

vector  rgbtohsv(float h, float s, float v)

rgbtoxyz

Convert a linear sRGB triplet to CIE XYZ tristimulus values.

vector  rgbtoxyz(vector rgb)

xyztorgb

Convert CIE XYZ tristimulus values to a linear sRGB triplet.

vector  xyztorgb(vector xyz)

Open Color IO

ocio_activedisplays

Returns the names of active displays supported in Open Color IO

string [] ocio_activedisplays()

ocio_activeviews

Returns the names of active views supported in Open Color IO

string [] ocio_activeviews()

ocio_import

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)

ocio_roles

Returns the names of roles supported in Open Color IO

string [] ocio_roles()

ocio_spaces

Returns the names of color spaces supported in Open Color IO.

string [] ocio_spaces()

ocio_transform

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.

Utility functions

blackbody

Compute the color value of an incandescent black body.

vector  blackbody(float temperature, float luminance)

ctransform

Transforms between color spaces.

vector  ctransform(string fromspace, string tospace, vector clr)

vector  ctransform(string tospace, vector clr)

luminance

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)

VEX

Language

Next steps

Reference