Top Description Fields Constructors Methods
io.github.darvil.terminal.textformatter.color

public final Enum SimpleColor

extends Enum<SimpleColor>
implements Color
Class Inheritance
All Implemented Interfaces
io.github.darvil.terminal.textformatter.color.Color
Imports
org.jetbrains.annotations.NotNull, io.github.darvil.terminal.textformatter.TextFormatter

Enumerates the ANSI color codes that a terminal can normally display.

Field Summary

Modifier and TypeField and Description
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final @NotNull SimpleColor[]
BRIGHT_COLORS

Array of all the bright colors.

public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final @NotNull SimpleColor[]
DARK_COLORS

Array of all the dark colors.

public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
public static final SimpleColor
private final byte
public static final SimpleColor
public static final SimpleColor

Constructor Summary

AccessConstructor and Description
private
SimpleColor(int value)

Method Summary

Modifier and TypeMethod and Description
public @NotNull String
bg()

Implements io.github.darvil.terminal.textformatter.color.Color.bg.

Returns the ANSI escape sequence for this color for the text background.

public @NotNull String
fg()

Implements io.github.darvil.terminal.textformatter.color.Color.fg.

Returns the ANSI escape sequence for this color for the text foreground.

public @NotNull String
toString()

Overrides java.lang.Enum.toString.

Implements io.github.darvil.terminal.textformatter.color.Color.toString.

Returns the ANSI escape sequence for this color for the text foreground.

public static SimpleColor
public static SimpleColor[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

BLACKback to summary
public static final SimpleColor BLACK
BLUEback to summary
public static final SimpleColor BLUE
BRIGHT_BLUEback to summary
public static final SimpleColor BRIGHT_BLUE
BRIGHT_COLORSback to summary
public static final @NotNull SimpleColor[] BRIGHT_COLORS

Array of all the bright colors.

Annotations
@NotNull
BRIGHT_CYANback to summary
public static final SimpleColor BRIGHT_CYAN
BRIGHT_GREENback to summary
public static final SimpleColor BRIGHT_GREEN
BRIGHT_MAGENTAback to summary
public static final SimpleColor BRIGHT_MAGENTA
BRIGHT_REDback to summary
public static final SimpleColor BRIGHT_RED
BRIGHT_WHITEback to summary
public static final SimpleColor BRIGHT_WHITE
BRIGHT_YELLOWback to summary
public static final SimpleColor BRIGHT_YELLOW
CYANback to summary
public static final SimpleColor CYAN
DARK_COLORSback to summary
public static final @NotNull SimpleColor[] DARK_COLORS

Array of all the dark colors.

Annotations
@NotNull
GRAYback to summary
public static final SimpleColor GRAY
GREENback to summary
public static final SimpleColor GREEN
MAGENTAback to summary
public static final SimpleColor MAGENTA
REDback to summary
public static final SimpleColor RED
valueback to summary
private final byte value
WHITEback to summary
public static final SimpleColor WHITE
YELLOWback to summary
public static final SimpleColor YELLOW

Constructor Detail

SimpleColorback to summary
private SimpleColor(int value)

Method Detail

bgback to summary
public @NotNull String bg()

Implements io.github.darvil.terminal.textformatter.color.Color.bg.

Doc from io.github.darvil.terminal.textformatter.color.Color.bg.

Returns the ANSI escape sequence for this color for the text background.

Annotations
@Override
@NotNull
fgback to summary
public @NotNull String fg()

Implements io.github.darvil.terminal.textformatter.color.Color.fg.

Doc from io.github.darvil.terminal.textformatter.color.Color.fg.

Returns the ANSI escape sequence for this color for the text foreground.

Annotations
@Override
@NotNull
toStringback to summary
public @NotNull String toString()

Overrides java.lang.Enum.toString.

Implements io.github.darvil.terminal.textformatter.color.Color.toString.

Doc from io.github.darvil.terminal.textformatter.color.Color.toString.

Returns the ANSI escape sequence for this color for the text foreground.

Annotations
@Override
@NotNull
valueOfback to summary
public static SimpleColor valueOf(String name)
valuesback to summary
public static SimpleColor[] values()