public enum BasicColor extends Enum<BasicColor> implements AnsiColorProvider
| Enum Constant and Description |
|---|
BLACK |
BLUE |
BRIGHT_BLACK |
BRIGHT_BLUE |
BRIGHT_CYAN |
BRIGHT_GREEN |
BRIGHT_MAGENTA |
BRIGHT_RED |
BRIGHT_WHITE |
BRIGHT_YELLOW |
CYAN |
GREEN |
MAGENTA |
RED |
WHITE |
YELLOW |
| Modifier and Type | Method and Description |
|---|---|
String |
getAnsiBackgroundControlCode()
Gets the ANSI control code for setting the background colour
|
String |
getAnsiForegroundControlCode()
Gets the ANSI control code for setting the foreground colour
|
String |
toString() |
boolean |
usesExtendedColors()
Gets whether extended colours are used as this will affect the ANSI reset
sequence that needs to be used
|
static BasicColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BasicColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BasicColor BLACK
public static final BasicColor RED
public static final BasicColor GREEN
public static final BasicColor YELLOW
public static final BasicColor BLUE
public static final BasicColor MAGENTA
public static final BasicColor CYAN
public static final BasicColor WHITE
public static final BasicColor BRIGHT_BLACK
public static final BasicColor BRIGHT_RED
public static final BasicColor BRIGHT_GREEN
public static final BasicColor BRIGHT_YELLOW
public static final BasicColor BRIGHT_BLUE
public static final BasicColor BRIGHT_MAGENTA
public static final BasicColor BRIGHT_CYAN
public static final BasicColor BRIGHT_WHITE
public static BasicColor[] values()
for (BasicColor c : BasicColor.values()) System.out.println(c);
public static BasicColor 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 String getAnsiForegroundControlCode()
AnsiColorProvidergetAnsiForegroundControlCode in interface AnsiColorProviderpublic String getAnsiBackgroundControlCode()
AnsiColorProvidergetAnsiBackgroundControlCode in interface AnsiColorProviderpublic boolean usesExtendedColors()
AnsiColorProviderusesExtendedColors in interface AnsiColorProviderpublic String toString()
toString in class Enum<BasicColor>Copyright © 2012–2022. All rights reserved.