Note
Support for true color is not universal. Expect this implementation to work in most modern terminals, but not all.
| Modifier and Type | Field and Description |
|---|---|
| private final byte | |
| public static final TrueColor | BLACK
The color black. |
| public static final TrueColor | BLUE
The color blue. |
| public static final TrueColor | CYAN
The color cyan. |
| private final byte | |
| public static final TrueColor | GREEN
The color green. |
| public static final TrueColor | MAGENTA
The color magenta. |
| private final byte | |
| public static final TrueColor | RED
The color red. |
| public static final TrueColor | WHITE
The color white. |
| public static final TrueColor | YELLOW
The color yellow. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public byte | |
| public @NotNull String | bg()
Implements io. Returns the ANSI escape sequence for this color for the text background. |
| public @NotNull String | fg()
Implements io. Returns the ANSI escape sequence for this color for the text foreground. |
| public byte | |
| private @NotNull String | |
| public static @NotNull TrueColor | Returns: A new TrueColor object with the given RGB components.The red component, in the range 0-255. r, int The green component, in the range 0-255. g, int The blue component, in the range 0-255. b)Creates a new TrueColor object with the given RGB components. |
| public static @NotNull TrueColor | Returns: A new TrueColor object with the given RGB components.The RGB components packed into a single integer. rgb)Creates a new TrueColor object with the given RGB components packed into a single integer. |
| public byte | |
| public @NotNull String | toString()
Overrides java. Implements io. Returns the ANSI escape sequence for this color for the text foreground. |
| b | back to summary |
|---|---|
| private final byte b | |
| BLACK | back to summary |
|---|---|
| public static final TrueColor BLACK The color black. | |
| BLUE | back to summary |
|---|---|
| public static final TrueColor BLUE The color blue. | |
| CYAN | back to summary |
|---|---|
| public static final TrueColor CYAN The color cyan. | |
| g | back to summary |
|---|---|
| private final byte g | |
| GREEN | back to summary |
|---|---|
| public static final TrueColor GREEN The color green. | |
| MAGENTA | back to summary |
|---|---|
| public static final TrueColor MAGENTA The color magenta. | |
| r | back to summary |
|---|---|
| private final byte r | |
| RED | back to summary |
|---|---|
| public static final TrueColor RED The color red. | |
| WHITE | back to summary |
|---|---|
| public static final TrueColor WHITE The color white. | |
| YELLOW | back to summary |
|---|---|
| public static final TrueColor YELLOW The color yellow. | |
| TrueColor | back to summary |
|---|---|
| private TrueColor(byte r, byte g, byte b) | |
| b | back to summary |
|---|---|
| public byte b() Returns the blue component of this color.
| |
| bg | back to summary |
|---|---|
| public @NotNull String bg() Implements io. Doc from io. Returns the ANSI escape sequence for this color for the text background. | |
| fg | back to summary |
|---|---|
| public @NotNull String fg() Implements io. Doc from io. Returns the ANSI escape sequence for this color for the text foreground. | |
| g | back to summary |
|---|---|
| public byte g() Returns the green component of this color.
| |
| getSequence | back to summary |
|---|---|
private @NotNull String getSequence(boolean fg)
| |
| of | back to summary |
|---|---|
| public static @NotNull TrueColor of(int r, int g, int b) Creates a new TrueColor object with the given RGB components.
| |
| of | back to summary |
|---|---|
| public static @NotNull TrueColor of(int rgb) Creates a new TrueColor object with the given RGB components packed into a single integer. | |
| r | back to summary |
|---|---|
| public byte r() Returns the red component of this color.
| |
| toString | back to summary |
|---|---|
| public @NotNull String toString() Overrides java. Implements io. Doc from io. Returns the ANSI escape sequence for this color for the text foreground. | |