List of Color Conversion Utilities

3DS Max Plug-In SDK

List of Color Conversion Utilities

The following global functions are available for color conversion. These are defined in \MAXSDK\INCLUDE\HSV.H.

Prototype:

void RGBtoHSV(DWORD rgb, int *ho, int *so, int *vo);

Remarks:

Converts the specified color in RGB to HSV.

Parameters:

DWORD rgb

The RGB color to convert.

int *ho

The hue output.

int *so

The saturation output.

int *vo

The value output.

Prototype:

DWORD HSVtoRGB(int H, int S, int V);

Remarks:

Converts the specified color in HSV color to RGB.

Parameters:

int H

The input hue.

int S

The input saturation.

int V

The input value.

Return Value:

The RGB color as a DWORD. See COLORREF.

Prototype:

void HSVtoHWBt(int h, int s, int v, int *ho, int *w, int *bt);

Remarks:

Converts the specified color in HSV color to Hue Whiteness and Blackness (HWBt).

Parameters:

int h

The input hue.

int s

The input saturation.

int v

The input value.

int *ho

The hue output.

int *w

The whiteness output.

int *bt

The blackness output.

Prototype:

void HWBttoHSV(int h, int w, int bt, int *ho, int *s, int *v);

Remarks:

Converts the specified color in Hue Whiteness and Blackness (HWBt) color to HSV.

Parameters:

int h

The hue input.

int w

The whiteness input.

int bt

The blackness input.

int *ho

The hue output.

int *s

The saturation output.

int *v

The value output.