IntegerToColorValue Method

NI Vision for Visual Basic

IntegerToColorValue Method

Syntax

CWIMAQVision.IntegerToColorValue Values, ColorFormat, Plane1, Plane2, Plane3

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Converts integers to color values.

Parameters

Values As Variant

The integers to convert. This parameter can be a scalar value or an array.

ColorFormat As CWIMAQColorFormats

Defines the color format to use for the operation.

Plane1 As Variant

On return, the converted red or hue values.

Plane2 As Variant

On return, the converted green or saturation values.

Plane3 As Variant

On return, the converted blue, light, value, or intensity values.

Example

Dim plane1
Dim plane2
Dim plane3

' Get the hue, saturation, and luminance planes equivalent to
' a set of vb colors.
CWIMAQVision1.IntegerToColorValue Array(vbBlue, vbGreen, vbBlue), _
                                  cwimaqColorFormatHSL, _
                                  plane1, plane2, plane3