screenColors

returns the number of colors the screen can display.

# Metadata

Platforms: desktop, server OS: mac, windows, linux Introduced: 1.0 Security:

# Syntax

the screenColors

# Examples

the screenColors

if the screenColors = 2 then put "black & white" into graphicsLevel

# Description

Use the screenColors function to determine the color capacity of the screen. For example, you might display different images depending on the number of colors available.

If the system has more than one monitor, the screenColors function returns the number of colors for the main screen.

The expression

the screenColors

is equal to

2 ^ (the screenDepth)

The value returned by the screenColors function is updated only when you start up the application. If you change the screen settings after starting up the application, you must quit and restart to update the screenColors.

# Tags

# See

- **property:** colorWorld, colorMap, borderPixel, dontRefresh, remapColor - **control structure:** function - **keyword:** integer - **object:** image - **glossary:** return, application - **command:** unlock colorMap - **function:** screenType