charva.awt
Class Color

java.lang.Object
  extended bycharva.awt.Color

public class Color
extends java.lang.Object

A class used to represent the color values available on a text terminal.


Field Summary
static Color black
           
static Color blue
           
static Color cyan
           
static Color green
           
static Color magenta
           
static Color red
           
static Color white
           
static Color yellow
           
 
Constructor Summary
Color(int red_, int green_, int blue_)
          Construct a Color from the specified RGB values.
 
Method Summary
 boolean equals(java.lang.Object obj_)
           
static Color fromCursesColor(int colorval_)
          Convert from an integer (ncurses-compatible) value to a Color object.
static java.lang.String getColorName(int colorval_)
          Convert an ncurses color value to a color name.
 int getCursesColor()
          Convert the Color object to an integer value compatible with the ncurses library.
static int getCursesColor(Color foreground_, Color background_)
          Compute the ncurses color-pair number corresponding to the specified foreground and background color.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

black

public static final Color black

red

public static final Color red

green

public static final Color green

yellow

public static final Color yellow

blue

public static final Color blue

magenta

public static final Color magenta

cyan

public static final Color cyan

white

public static final Color white
Constructor Detail

Color

public Color(int red_,
             int green_,
             int blue_)
Construct a Color from the specified RGB values. Each value must be in the range 0-255.

Method Detail

equals

public boolean equals(java.lang.Object obj_)

getCursesColor

public int getCursesColor()
Convert the Color object to an integer value compatible with the ncurses library.


toString

public java.lang.String toString()

getCursesColor

public static int getCursesColor(Color foreground_,
                                 Color background_)
Compute the ncurses color-pair number corresponding to the specified foreground and background color.


getColorName

public static java.lang.String getColorName(int colorval_)
Convert an ncurses color value to a color name.


fromCursesColor

public static Color fromCursesColor(int colorval_)
Convert from an integer (ncurses-compatible) value to a Color object.