Color space

These functions lets you convert colors between useful color spaces like RGB (For rendering), HSV (For user interfaces), XYZ (for a luminance corrected RGB) and LAB (For color correction).

f_rgb_to_hsv

void f_rgb_to_hsv(float *hsv, float r, float g, float b);

Description: Converts from RBG to HSV.

f_hsv_to_rgb

void f_hsv_to_rgb(float *rgb, float h, float s, float v);

Description: Converts from HSV to RGB.

f_rgb_to_xyz

void f_rgb_to_xyz(float *xyz, float r, float g, float b);

Description: Converts from RBG to XYZ.

f_xyz_to_rgb

void f_xyz_to_rgb(float *rgb, float x, float y, float z);

Description: Converts from XYZ to RGB.

f_xyz_to_lab

void f_xyz_to_lab(float *lab, float x, float y, float z);

Description: Converts from XYZ to LAB.

f_lab_to_xyz

void f_lab_to_xyz(float *xyz, float l, float a, float b);

Description: Converts from LAB to XYZ.

f_rgb_to_lab

void f_rgb_to_lab(float *lab, float r, float g, float b);

Description: Converts from RBG to LAB.

f_lab_to_rgb

void f_lab_to_rgb(float *rgb, float l, float a, float b);

Description: Converts from LAB to RGB.