RGBValue

NI Vision for LabWindows/CVI Function

RGBValue

The information needed to describe a color in the RGB (Red, Green, and Blue) color space. There are several RGB constants already defined in NIVision.h, as follows:

Name Value
IMAQ_RGB_TRANSPARENT {0,0,0,1}
IMAQ_RGB_BLACK {0,0,0,0}
IMAQ_RGB_WHITE {255,255,255,0}
IMAQ_RGB_RED {0,0,255,0}
IMAQ_RGB_BLUE {255,0,0,0}
IMAQ_RGB_GREEN {0,255,0,0}
IMAQ_RGB_YELLOW {0,255,255,0}

There are additional constants you can use to initialize an RGBValue structure at declaration:

Name Value
IMAQ_INIT_RGB_TRANSPARENT {0,0,0,1}
IMAQ_INIT_RGB_BLACK {0,0,0,0}
IMAQ_INIT_RGB_WHITE {255,255,255,0}
IMAQ_INIT_RGB_RED {0,0,255,0}
IMAQ_INIT_RGB_BLUE {255,0,0,0}
IMAQ_INIT_RGB_GREEN {0,255,0,0}
IMAQ_INIT_RGB_YELLOW {0,255,255,0}

Elements

Name

Type

Description

B unsigned char The blue value of the color.
G unsigned char The green value of the color.
R unsigned char The red value of the color.
alpha unsigned char The alpha value of the color, which represents extra information about a color image, such as gamma correction.