<doc>
  <legacy_id>2257</legacy_id>
  <name>screenColors</name>
  <type>function</type>
  <syntax>
    <example>the screenColors</example>
    <example>screenColors()</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>The System Environment</category>
  </classification>
  <references>
    <command tag="unlock colorMap">unlock colorMap Command</command>
    <function tag="screenType">screenType Function</function>
    <property tag="borderPixel">borderPixel Property</property>
    <property tag="colorWorld">colorWorld Property</property>
    <property tag="colorMap">colorMap Property</property>
    <property tag="dontRefresh">dontRefresh Property</property>
    <property tag="remapColor">remapColor Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> the number of colors the screen can display.</summary>
  <examples>
    <example>the screenColors</example>
    <example>if the screenColors = 2 then put "black &amp; white" into graphicsLevel</example>
  </examples>
  <description>
    <p>Use the <b>screenColors</b> <control_st tag="function">function</control_st> to determine the color capacity of the screen. For example, you might display different <glossary tag="image">images</glossary> depending on the number of colors available.</p><p/><p><b>Value:</b></p><p>The <b>screenColors</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a positive <keyword tag="integer">integer</keyword> which is a power of two.</p><p/><p><b>Comments:</b></p><p>If the system has more than one monitor, the <b>screenColors</b> function <glossary tag="return">returns</glossary> the number of colors for the main screen.</p><p/><p>The expression</p><p><code>  the screenColors</code></p><p>is equal t<code>o</code></p><p><code>  the screenDepth^2</code></p><p/><p>The value returned by the <b>screenColors</b> <control_st tag="function">function</control_st> is updated only when you start up the <glossary tag="application">application</glossary>. If you change the screen settings after starting up the <glossary tag="application">application</glossary>, you must quit and restart to update the <b>screenColors</b>.</p>
  </description>
</doc>