Microsoft DirectX 8.1 (Visual Basic)

D3DColorRGBA

Initializes a color with the supplied red, green, blue, and alpha values.

D3DColorRGBA( _ 
    r As Integer, _ 
    g As Integer, _ 
    b As Integer, _ 
    a As Integer) As Long

Parameters

r
Red value of the color. Values between 0 and 255.
g
Green value of the color. Values between 0 and 255.
b
Blue value of the color. Values between 0 and 255.
a
Alpha value of the color. Values between 0 and 255.

Return Values

Returns the Long value that corresponds to the supplied RGBA values.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Visual Basic Error Handling topic.