public enum AnsiForeground extends Enum<AnsiForeground> implements AnsiColor
| Enum Constant and Description |
|---|
BLACK
黑色
|
BLUE
蓝色
|
BRIGHT_BLACK
亮黑色 (灰)
|
BRIGHT_BLUE
亮蓝色
|
BRIGHT_CYAN
亮青色
|
BRIGHT_GREEN
亮绿色
|
BRIGHT_PURPLE
亮紫色
|
BRIGHT_RED
亮红色
|
BRIGHT_WHITE
亮白色
|
BRIGHT_YELLOW
亮黄色
|
CYAN
青色
|
DEFAULT
默认
|
GREEN
绿色
|
PURPLE
紫色
|
RED
红色
|
WHITE
白色
|
YELLOW
黄色
|
| Modifier and Type | Field and Description |
|---|---|
int |
code
颜色码
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCode()
获取 SGR Code
|
String |
toString()
获取元素
|
static AnsiForeground |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AnsiForeground[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AnsiForeground BLACK
public static final AnsiForeground RED
public static final AnsiForeground GREEN
public static final AnsiForeground YELLOW
public static final AnsiForeground BLUE
public static final AnsiForeground PURPLE
public static final AnsiForeground CYAN
public static final AnsiForeground WHITE
public static final AnsiForeground DEFAULT
public static final AnsiForeground BRIGHT_BLACK
public static final AnsiForeground BRIGHT_RED
public static final AnsiForeground BRIGHT_GREEN
public static final AnsiForeground BRIGHT_YELLOW
public static final AnsiForeground BRIGHT_BLUE
public static final AnsiForeground BRIGHT_PURPLE
public static final AnsiForeground BRIGHT_CYAN
public static final AnsiForeground BRIGHT_WHITE
public static AnsiForeground[] values()
for (AnsiForeground c : AnsiForeground.values()) System.out.println(c);
public static AnsiForeground 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 toString()
AnsiElementtoString in interface AnsiElementtoString in class Enum<AnsiForeground>Copyright © 2024. All rights reserved.