TextColor
, Serializable
, Comparable<TextColor.ANSI>
public static enum TextColor.ANSI extends Enum<TextColor.ANSI> implements TextColor
For more information, see http://en.wikipedia.org/wiki/File:Ansi.png
TextColor.ANSI, TextColor.Factory, TextColor.Indexed, TextColor.RGB
Enum Constant | Description |
---|---|
BLACK |
|
BLUE |
|
CYAN |
|
DEFAULT |
|
GREEN |
|
MAGENTA |
|
RED |
|
WHITE |
|
YELLOW |
Modifier and Type | Method | Description |
---|---|---|
byte[] |
getBackgroundSGRSequence() |
Returns the byte sequence in between CSI and character 'm' that is used to enable this color as the background
color on an ANSI-compatible terminal.
|
byte[] |
getForegroundSGRSequence() |
Returns the byte sequence in between CSI and character 'm' that is used to enable this color as the foreground
color on an ANSI-compatible terminal.
|
Color |
toColor() |
Converts this color to an AWT color object, assuming a standard VGA palette.
|
static TextColor.ANSI |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static TextColor.ANSI[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TextColor.ANSI BLACK
public static final TextColor.ANSI RED
public static final TextColor.ANSI GREEN
public static final TextColor.ANSI YELLOW
public static final TextColor.ANSI BLUE
public static final TextColor.ANSI MAGENTA
public static final TextColor.ANSI CYAN
public static final TextColor.ANSI WHITE
public static final TextColor.ANSI DEFAULT
public static TextColor.ANSI[] values()
for (TextColor.ANSI c : TextColor.ANSI.values()) System.out.println(c);
public static TextColor.ANSI valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte[] getForegroundSGRSequence()
TextColor
getForegroundSGRSequence
in interface TextColor
public byte[] getBackgroundSGRSequence()
TextColor
getBackgroundSGRSequence
in interface TextColor
Copyright © 2020. All rights reserved.