Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions > Canvas Control >

Canvas_Color

Previous pageReturn to chapter overviewNext page

 

Description

 

Set the foreground color and optionally the background color for the next Canvas statements.

 

Syntax

 

n = Canvas_Color( foreground [, background])

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

foreground

Number

No

RGB color for foreground

background

Number

No

RGB color for background

 

Remarks

 

If either parameter are -1, the default foreground/background color is used.

If the background parameter is -2, the background is not painted, allowing the content behind to become visible.

Otherwise, the specified RGB color is used.

 

Restrictions

 

See also

 

Examples