Microsoft DirectX 8.1 (Visual Basic)

D3DColorMake

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

D3DColorMake( _ 
    r As Single, _ 
    g As Single, _ 
    b As Single, _ 
    a As Single) As Long

Parameters

r
Red value of the color. Values between 0.0 and 1.0.
g
Green value of the color. Values between 0.0 and 1.0.
b
Blue value of the color. Values between 0.0 and 1.0.
a
Blue value of the color. Values between 0.0 and 1.0.

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.