Lingo Dictionary > A-C > bgColor |  |

bgColor

Syntax

    sprite(whichSpriteNumber).bgColor
    the bgColor of sprite whichSpriteNumber
    the bgColor of the stage
    (the stage).bgColor

Description

Sprite property and system property; determines the background color of the sprite specified by `whichSprite` or the color of the Stage. Setting the `bgColor` sprite property is equivalent to choosing the background color from the Tools window when the sprite is selected on the Stage. Setting the `bgColor` property for the Stage is equivalent to setting the color in the Movie Properties dialog box.

The sprite property has the equivalent functionality of the `backColor` sprite property, but the color value returned is a color object of whatever type has been set for that sprite.

This property can be tested and set.

Example

This example sets the color of the Stage to an RGB value.

Dot syntax:

    (the stage).bgColor = rgb(255, 153, 0)

Verbose Lingo syntax:

    set the bgColor of the stage = rgb(255, 153, 0)

See also

`color(), backColor, backgroundColor, stageColor`