Name: screenColors

Type: function

Syntax: the screenColors

Syntax: screenColors()

Summary:
<return|Returns> the number of colors the screen can display.

Introduced: 1.0

OS: mac, windows, linux

Platforms: desktop, server

Example:
the screenColors

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

Returns:
The <screenColors> <function> <return|returns> a positive <integer>
which is a power of two.

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

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

The expression

    the screenColors

is equal to

    the screenDepth^2


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>. 

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

