dxColor(red%,green%,blue%)

Parameters

red = value of red component (0-255)
green = value of green component (0-255)
blue = value of blue component (0-255)

Description

This command sets the drawing dxColor (using RGB values) for all subsequent drawing commands (dxLine, dxRect, dxText, etc.) You must be in Graphics mode to execute this command.

Example

; dxColor, dxColorRed(), dxColorBlue(), dxColorGreen() Example

; Gotta be in graphics mode
Graphics 640,480

; Change the random seed
dxSeedRnd MilliSecs()

; Let's set the dxColor to something random
dxColor dxRnd(0,255),dxRnd(0,255),dxRnd(0,255)

; Now let's see what they are!
While Not dxKeyHit(1)
dxText 0,0,"This dxText is printed in Red=" + dxColorRed() + " Green=" + dxColorGreen() + " Blue=" + dxColorBlue() + "!"
Wend

Index