public enum AnsiColor extends Enum<AnsiColor> implements AnsiElement
来自Spring Boot
Enum Constant and Description |
---|
BLACK
黑
|
BLUE
蓝
|
BRIGHT_BLACK
亮黑
|
BRIGHT_BLUE
亮蓝
|
BRIGHT_CYAN
亮青
|
BRIGHT_GREEN
亮绿
|
BRIGHT_MAGENTA
亮品红
|
BRIGHT_RED
亮红
|
BRIGHT_WHITE
亮白
|
BRIGHT_YELLOW
亮黄
|
CYAN
青
|
DEFAULT
默认前景色
|
GREEN
绿
|
MAGENTA
品红
|
RED
红
|
WHITE
白
|
YELLOW
黄
|
Modifier and Type | Method and Description |
---|---|
int |
getCode()
获取ANSI颜色代码
|
String |
toString() |
static AnsiColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AnsiColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AnsiColor DEFAULT
public static final AnsiColor BLACK
public static final AnsiColor RED
public static final AnsiColor GREEN
public static final AnsiColor YELLOW
public static final AnsiColor BLUE
public static final AnsiColor MAGENTA
public static final AnsiColor CYAN
public static final AnsiColor WHITE
public static final AnsiColor BRIGHT_BLACK
public static final AnsiColor BRIGHT_RED
public static final AnsiColor BRIGHT_GREEN
public static final AnsiColor BRIGHT_YELLOW
public static final AnsiColor BRIGHT_BLUE
public static final AnsiColor BRIGHT_MAGENTA
public static final AnsiColor BRIGHT_CYAN
public static final AnsiColor BRIGHT_WHITE
public static AnsiColor[] values()
for (AnsiColor c : AnsiColor.values()) System.out.println(c);
public static AnsiColor 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 int getCode()
getCode
in interface AnsiElement
Copyright © 2025. All rights reserved.