<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.Color
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Choice.html#_top_">Previous</a>  <a href="java.awt.Component.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.Color
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.Color
</pre>
<hr>
<dl>
  <dt> public class <b>Color</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
This class encapsulates colors using the RGB format. In RGB 
 format, the red, blue, and green components of a color are each 
 represented by an integer in the range 0-255. The value 0 
 indicates no contribution from this primary color. The value 255 
 indicates the maximum intensity of this color component. 
 <p>
 Although the <code>Color</code> class is based on the 
 three-component RGB model, the class provides a set of convenience 
 methods for converting between RGB and HSB colors. For a 
 definition of the RGB and HSB color models, see Foley, van&nbsp;Dam, 
 Feiner, and Hughes, <cite>Computer Graphics: Principles 
 and Practice</cite>.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#black"><b>black</b></a>
  <dd>  The color black.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#blue"><b>blue</b></a>
  <dd>  The color blue.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#cyan"><b>cyan</b></a>
  <dd>  The color cyan.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#darkGray"><b>darkGray</b></a>
  <dd>  The color dark gray.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#gray"><b>gray</b></a>
  <dd>  The color gray.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#green"><b>green</b></a>
  <dd>  The color green.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lightGray"><b>lightGray</b></a>
  <dd>  The color light gray.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#magenta"><b>magenta</b></a>
  <dd>  The color magenta.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#orange"><b>orange</b></a>
  <dd>  The color orange.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#pink"><b>pink</b></a>
  <dd>  The color pink.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#red"><b>red</b></a>
  <dd>  The color red.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#white"><b>white</b></a>
  <dd>  The color white.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#yellow"><b>yellow</b></a>
  <dd>  The color yellow.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Color(float, float, float)"><b>Color</b></a>(float, float, float)
  <dd>  Creates a color with the specified red, green, and blue values, 
 where each of the values is in the range 0.0-1.0.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Color(int)"><b>Color</b></a>(int)
  <dd>  Creates a color with the specified RGB value, where the red 
 component is in bits 16-23 of the argument, the green 
 component is in bits 8-15 of the argument, and the blue 
 component is in bits 0-7.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Color(int, int, int)"><b>Color</b></a>(int, int, int)
  <dd>  Creates a color with the specified red, green, and blue 
 components.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#brighter()"><b>brighter</b></a>()
  <dd>  Creates a brighter version of this color.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#darker()"><b>darker</b></a>()
  <dd>  Creates a darker version of this color.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#decode(java.lang.String)"><b>decode</b></a>(String)
  <dd>  Converts a string to an integer and returns the 
 specified color.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Determines whether another object is equal to this color.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBlue()"><b>getBlue</b></a>()
  <dd>  Gets the blue component of this color.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getColor(java.lang.String)"><b>getColor</b></a>(String)
  <dd>  Finds a color in the system properties.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getColor(java.lang.String, java.awt.Color)"><b>getColor</b></a>(String, Color)
  <dd>  Finds a color in the system properties.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getColor(java.lang.String, int)"><b>getColor</b></a>(String, int)
  <dd>  Finds a color in the system properties.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getGreen()"><b>getGreen</b></a>()
  <dd>  Gets the green component of this color.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getHSBColor(float, float, float)"><b>getHSBColor</b></a>(float, float, float)
  <dd>  Creates a <code>Color</code> object based on values supplied 
 for the HSB color model.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRed()"><b>getRed</b></a>()
  <dd>  Gets the red component of this color.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRGB()"><b>getRGB</b></a>()
  <dd>  Gets the RGB value representing the color in the default RGB ColorModel.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Computes the hash code for this color.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#HSBtoRGB(float, float, float)"><b>HSBtoRGB</b></a>(float, float, float)
  <dd>  Converts the components of a color, as specified by the HSB 
 model, to an equivalent set of values for the RGB model.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RGBtoHSB(int, int, int, float[])"><b>RGBtoHSB</b></a>(int, int, int, float[])
  <dd>  Converts the components of a color, as specified by the RGB 
 model, to an equivalent set of values for hue, saturation, and 
 brightness, the three components of the HSB model.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Creates a string that represents this color and indicates the 
 values of its RGB components.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="white"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>white</b>
<pre>
 public static final <a href="#_top_">Color</a> white
</pre>
<dl>
  <dd> The color white.<p>
</dl>
<a name="lightGray"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>lightGray</b>
<pre>
 public static final <a href="#_top_">Color</a> lightGray
</pre>
<dl>
  <dd> The color light gray.<p>
</dl>
<a name="gray"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>gray</b>
<pre>
 public static final <a href="#_top_">Color</a> gray
</pre>
<dl>
  <dd> The color gray.<p>
</dl>
<a name="darkGray"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>darkGray</b>
<pre>
 public static final <a href="#_top_">Color</a> darkGray
</pre>
<dl>
  <dd> The color dark gray.<p>
</dl>
<a name="black"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>black</b>
<pre>
 public static final <a href="#_top_">Color</a> black
</pre>
<dl>
  <dd> The color black.<p>
</dl>
<a name="red"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>red</b>
<pre>
 public static final <a href="#_top_">Color</a> red
</pre>
<dl>
  <dd> The color red.<p>
</dl>
<a name="pink"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>pink</b>
<pre>
 public static final <a href="#_top_">Color</a> pink
</pre>
<dl>
  <dd> The color pink.<p>
</dl>
<a name="orange"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>orange</b>
<pre>
 public static final <a href="#_top_">Color</a> orange
</pre>
<dl>
  <dd> The color orange.<p>
</dl>
<a name="yellow"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>yellow</b>
<pre>
 public static final <a href="#_top_">Color</a> yellow
</pre>
<dl>
  <dd> The color yellow.<p>
</dl>
<a name="green"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>green</b>
<pre>
 public static final <a href="#_top_">Color</a> green
</pre>
<dl>
  <dd> The color green.<p>
</dl>
<a name="magenta"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>magenta</b>
<pre>
 public static final <a href="#_top_">Color</a> magenta
</pre>
<dl>
  <dd> The color magenta.<p>
</dl>
<a name="cyan"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>cyan</b>
<pre>
 public static final <a href="#_top_">Color</a> cyan
</pre>
<dl>
  <dd> The color cyan.<p>
</dl>
<a name="blue"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>blue</b>
<pre>
 public static final <a href="#_top_">Color</a> blue
</pre>
<dl>
  <dd> The color blue.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Color"></a>
<a name="Color(int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Color</b>
<pre>
 public Color(int r,
              int g,
              int b)
</pre>
<dl>
  <dd> Creates a color with the specified red, green, and blue 
 components. The three arguments must each be in the range 
 0-255. 
 <p>
 The actual color used in rendering depends on finding the best 
 match given the color space available for a given output device.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> r - the red component.
    <dd> g - the green component.
    <dd> b - the blue component.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRed.">getRed.</a>, <a href="#getGreen.">getGreen.</a>, <a href="#getBlue.">getBlue.</a>, <a href="#getRGB.">getRGB.</a>
  </dl></dd>
</dl>
<a name="Color(int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Color</b>
<pre>
 public Color(int rgb)
</pre>
<dl>
  <dd> Creates a color with the specified RGB value, where the red 
 component is in bits 16-23 of the argument, the green 
 component is in bits 8-15 of the argument, and the blue 
 component is in bits 0-7. The value zero indicates no 
 contribution from the primary color component. 
 <p>
 The actual color used in rendering depends on finding the best 
 match given the color space available for a given output device.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> rgb - an integer giving the red, green, and blue components.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getRGBdefault">getRGBdefault</a>, <a href="#getRed.">getRed.</a>, <a href="#getGreen.">getGreen.</a>, <a href="#getBlue.">getBlue.</a>, <a href="#getRGB.">getRGB.</a>
  </dl></dd>
</dl>
<a name="Color(float, float, float)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Color</b>
<pre>
 public Color(float r,
              float g,
              float b)
</pre>
<dl>
  <dd> Creates a color with the specified red, green, and blue values, 
 where each of the values is in the range 0.0-1.0. The value 
 0.0 indicates no contribution from the primary color component. 
 The value 1.0 indicates the maximum intensity of the primary color 
 component. 
 <p>
 The actual color used in rendering depends on finding the best 
 match given the color space available for a given output device.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> r - the red component
    <dd> g - the red component
    <dd> b - the red component
    <dt> <b>See Also:</b>
    <dd> <a href="#getRed.">getRed.</a>, <a href="#getGreen.">getGreen.</a>, <a href="#getBlue.">getBlue.</a>, <a href="#getRGB.">getRGB.</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getRed()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRed"><b>getRed</b></a>
<pre>
 public int getRed()
</pre>
<dl>
  <dd> Gets the red component of this color. The result is 
 an integer in the range 0 to 255.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the red component of this color.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRGB">getRGB</a>
  </dl></dd>
</dl>
<a name="getGreen()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getGreen"><b>getGreen</b></a>
<pre>
 public int getGreen()
</pre>
<dl>
  <dd> Gets the green component of this color. The result is 
 an integer in the range 0 to 255.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the green component of this color.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRGB">getRGB</a>
  </dl></dd>
</dl>
<a name="getBlue()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBlue"><b>getBlue</b></a>
<pre>
 public int getBlue()
</pre>
<dl>
  <dd> Gets the blue component of this color. The result is 
 an integer in the range 0 to 255.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the blue component of this color.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRGB">getRGB</a>
  </dl></dd>
</dl>
<a name="getRGB()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRGB"><b>getRGB</b></a>
<pre>
 public int getRGB()
</pre>
<dl>
  <dd> Gets the RGB value representing the color in the default RGB ColorModel. 
 The red, green, and blue components of the color are each scaled to be 
 a value between 0 (abscence of the color) and 255 (complete saturation). 
 Bits 24-31 of the returned integer are 0xff, bits 16-23 are the red 
 value, bit 8-15 are the green value, and bits 0-7 are the blue value.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getRGBdefault">getRGBdefault</a>, <a href="#getRed">getRed</a>, <a href="#getGreen">getGreen</a>, <a href="#getBlue">getBlue</a>
  </dl></dd>
</dl>
<a name="brighter()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="brighter"><b>brighter</b></a>
<pre>
 public <a href="#_top_">Color</a> brighter()
</pre>
<dl>
  <dd> Creates a brighter version of this color.
 <p>
 This method applies an arbitrary scale factor to each of the three RGB 
 components of the color to create a brighter version of the same 
 color. Although <code>brighter</code> and <code>darker</code> are 
 inverse operations, the results of a series of invocations of 
 these two methods may be inconsistent because of rounding errors.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a new <code>Color</code> object,
                            a brighter version of this color.
    <dt> <b>See Also:</b>
    <dd> <a href="#darker">darker</a>
  </dl></dd>
</dl>
<a name="darker()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="darker"><b>darker</b></a>
<pre>
 public <a href="#_top_">Color</a> darker()
</pre>
<dl>
  <dd> Creates a darker version of this color.
 <p>
 This method applies an arbitrary scale factor to each of the three RGB 
 components of the color to create a darker version of the same 
 color. Although <code>brighter</code> and <code>darker</code> are 
 inverse operations, the results of a series of invocations of 
 these two methods may be inconsistent because of rounding errors.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a new <code>Color</code> object,
                              a darker version of this color.
    <dt> <b>See Also:</b>
    <dd> <a href="#brighter">brighter</a>
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Computes the hash code for this color.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hash code value for this object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Determines whether another object is equal to this color.
 <p>
 The result is <code>true</code> if and only if the argument is not 
 <code>null</code> and is a <code>Color</code> object that has the same 
 red, green, and blue values as this object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - the object to compare with.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the objects are the same;
                             <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Creates a string that represents this color and indicates the 
 values of its RGB components.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a representation of this color as a
                           <code>String</code> object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="decode(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="decode"><b>decode</b></a>
<pre>
 public static <a href="#_top_">Color</a> decode(<a href="java.lang.String.html#_top_">String</a> nm) throws <a href="java.lang.NumberFormatException.html#_top_">NumberFormatException</a>
</pre>
<dl>
  <dd> Converts a string to an integer and returns the 
 specified color. This method handles string formats that 
 are used to represent octal and hexidecimal numbers.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - a string that represents
                            a color as a 24-bit integer.
    <dt> <b>Returns:</b>
    <dd> the new color
    <dt> <b>Throws:</b> <a href="java.lang.NumberFormatException.html#_top_">NumberFormatException</a>
    <dd> if the specified string cannot
                      be interpreted as a decimal, 
                      octal, or hexidecimal integer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Integer.html#decode">decode</a>
  </dl></dd>
</dl>
<a name="getColor(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getColor"><b>getColor</b></a>
<pre>
 public static <a href="#_top_">Color</a> getColor(<a href="java.lang.String.html#_top_">String</a> nm)
</pre>
<dl>
  <dd> Finds a color in the system properties. 
 <p>
 The argument is treated as the name of a system property to 
 be obtained. The string value of this property is then interpreted 
 as an integer which is then converted to a color. 
 <p>
 If the specified property is not found, or could not be parsed as 
 an integer, then <code>null</code> is returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - the name of the color property
    <dt> <b>Returns:</b>
    <dd> the color value of the property.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>, <a href="java.lang.Integer.html#getInteger(java.lang.String)">getInteger</a>, <a href="#Color(int)">Color</a>
  </dl></dd>
</dl>
<a name="getColor(java.lang.String, java.awt.Color)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getColor"><b>getColor</b></a>
<pre>
 public static <a href="#_top_">Color</a> getColor(<a href="java.lang.String.html#_top_">String</a> nm,
                              <a href="#_top_">Color</a> v)
</pre>
<dl>
  <dd> Finds a color in the system properties. 
 <p>
 The first argument is treated as the name of a system property to 
 be obtained. The string value of this property is then interpreted 
 as an integer which is then converted to a color. 
 <p>
 If the specified property is not found, or cannot be parsed as 
 an integer, then the color specified by the second argument is 
 returned instead.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - the name of the color property
    <dd> v - the default color value.
    <dt> <b>Returns:</b>
    <dd> the color value of the property.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>, <a href="java.lang.Integer.html#getInteger(java.lang.String)">getInteger</a>, <a href="#Color(int)">Color</a>
  </dl></dd>
</dl>
<a name="getColor(java.lang.String, int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getColor"><b>getColor</b></a>
<pre>
 public static <a href="#_top_">Color</a> getColor(<a href="java.lang.String.html#_top_">String</a> nm,
                              int v)
</pre>
<dl>
  <dd> Finds a color in the system properties. 
 <p>
 The first argument is treated as the name of a system property to 
 be obtained. The string value of this property is then interpreted 
 as an integer which is then converted to a color. 
 <p>
 If the specified property is not found, or could not be parsed as 
 an integer, then the integer value <code>v</code> is used instead, 
 and is converted to a color.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - the name of the color property.
    <dd> v - the default color value, as an integer.
    <dt> <b>Returns:</b>
    <dd> the color value of the property.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#getProperty(java.lang.String)">getProperty</a>, <a href="java.lang.Integer.html#getInteger(java.lang.String)">getInteger</a>, <a href="#Color(int)">Color</a>
  </dl></dd>
</dl>
<a name="HSBtoRGB(float, float, float)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="HSBtoRGB"><b>HSBtoRGB</b></a>
<pre>
 public static int HSBtoRGB(float hue,
                            float saturation,
                            float brightness)
</pre>
<dl>
  <dd> Converts the components of a color, as specified by the HSB 
 model, to an equivalent set of values for the RGB model. 
 <p>
 The integer that is returned by <code>HSBtoRGB</code> encodes the 
 value of a color in bits 0&endash;23 of an integer value, the same 
 format used by the method <code>getRGB</code>. This integer can be 
 supplied as an argument to the <code>Color</code> constructor that 
 takes a single integer argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> hue - the hue component of the color.
    <dd> saturation - the saturation of the color.
    <dd> brightness - the brightness of the color.
    <dt> <b>Returns:</b>
    <dd> the RGB value of the color with the indicated hue,
                            saturation, and brightness.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRGB()">getRGB</a>, <a href="#Color(int)">Color</a>
  </dl></dd>
</dl>
<a name="RGBtoHSB(int, int, int, float[])"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="RGBtoHSB"><b>RGBtoHSB</b></a>
<pre>
 public static float[] RGBtoHSB(int r,
                                int g,
                                int b,
                                float hsbvals[])
</pre>
<dl>
  <dd> Converts the components of a color, as specified by the RGB 
 model, to an equivalent set of values for hue, saturation, and 
 brightness, the three components of the HSB model. 
 <p>
 If the <code>hsbvals</code> argument is <code>null</code>, then a 
 new array is allocated to return the result. Otherwise, the method 
 returns the array <code>hsbvals</code>, with the values put into 
 that array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> r - the red component of the color.
    <dd> g - the green component of the color.
    <dd> b - the blue component of the color.
    <dd> hsbvals - the array to be used to return the
                     three HSB values, or <code>null</code>.
    <dt> <b>Returns:</b>
    <dd> an array of three elements containing the hue, saturation,
                     and brightness (in that order), of the color with 
                     the indicated red, green, and blue components.
    <dt> <b>See Also:</b>
    <dd> <a href="#getRGB()">getRGB</a>, <a href="#Color(int)">Color</a>
  </dl></dd>
</dl>
<a name="getHSBColor(float, float, float)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getHSBColor"><b>getHSBColor</b></a>
<pre>
 public static <a href="#_top_">Color</a> getHSBColor(float h,
                                 float s,
                                 float b)
</pre>
<dl>
  <dd> Creates a <code>Color</code> object based on values supplied 
 for the HSB color model. 
 <p>
 Each of the three components should be a floating-point 
 value between zero and one (a number in the range 
 <code>0.0</code>&nbsp;&le;&nbsp;<code>h</code>, <code>s</code>, 
 <code>b</code>&nbsp;&le;&nbsp;<code>1.0). </code>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> h - the hue component.
    <dd> s - the saturation of the color.
    <dd> b - the brightness of the color.
    <dt> <b>Returns:</b>
    <dd> a <code>Color</code> object with the specified hue,
                                 saturation, and brightness.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Choice.html#_top_">Previous</a>  <a href="java.awt.Component.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
