Package org.aesh.terminal.formatting
Enum Color
- All Implemented Interfaces:
Serializable,Comparable<Color>,java.lang.constant.Constable
Enumeration of ANSI terminal colors with intensity and type options.
- Author:
- Ståle W. Pedersen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumColor intensity levels for ANSI terminal colors.static enumSpecifies whether a color applies to foreground or background.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBlack color (ANSI code 0).Blue color (ANSI code 4).Cyan color (ANSI code 6).Default terminal color (ANSI code 9).Green color (ANSI code 2).Magenta color (ANSI code 5).Red color (ANSI code 1).White color (ANSI code 7).Yellow color (ANSI code 3). -
Method Summary
-
Enum Constant Details
-
BLACK
Black color (ANSI code 0). -
RED
Red color (ANSI code 1). -
GREEN
Green color (ANSI code 2). -
YELLOW
Yellow color (ANSI code 3). -
BLUE
Blue color (ANSI code 4). -
MAGENTA
Magenta color (ANSI code 5). -
CYAN
Cyan color (ANSI code 6). -
WHITE
White color (ANSI code 7). -
DEFAULT
Default terminal color (ANSI code 9).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()Returns the ANSI color code value.- Returns:
- the ANSI color code value
-