TextColor
public static class TextColor.RGB extends Object implements TextColor
TextColor.ANSI, TextColor.Factory, TextColor.Indexed, TextColor.RGB
Constructor | Description |
---|---|
RGB(int r,
int g,
int b) |
This class can be used to specify a color in 24-bit color space (RGB with 8-bit resolution per color).
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object obj) |
|
byte[] |
getBackgroundSGRSequence() |
Returns the byte sequence in between CSI and character 'm' that is used to enable this color as the background
color on an ANSI-compatible terminal.
|
int |
getBlue() |
|
byte[] |
getForegroundSGRSequence() |
Returns the byte sequence in between CSI and character 'm' that is used to enable this color as the foreground
color on an ANSI-compatible terminal.
|
int |
getGreen() |
|
int |
getRed() |
|
int |
hashCode() |
|
Color |
toColor() |
Converts this color to an AWT color object, assuming a standard VGA palette.
|
String |
toString() |
public RGB(int r, int g, int b)
r
- Red intensity, from 0 to 255g
- Green intensity, from 0 to 255b
- Blue intensity, from 0 to 255public byte[] getForegroundSGRSequence()
TextColor
getForegroundSGRSequence
in interface TextColor
public byte[] getBackgroundSGRSequence()
TextColor
getBackgroundSGRSequence
in interface TextColor
public Color toColor()
TextColor
public int getRed()
public int getGreen()
public int getBlue()
Copyright © 2020. All rights reserved.