Class ColorAttr
java.lang.Object
net.orbyfied.j8.util.logging.formatting.AnsiAttr
net.orbyfied.j8.util.logging.formatting.attr.ColorAttr
- Direct Known Subclasses:
TextFormat
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
color
Color string/array. 3 elements if RGB, 1 if 8-bit. -
col
The raw color object. This is a 'char' if it is 8-bit and ajava.awt.Colorobject if RGB.
-
-
Constructor Details
-
ColorAttr
public ColorAttr(char c) 8-bit constructor.- Parameters:
c- The color number/character (range 0-255)
-
ColorAttr
public ColorAttr(int r, int g, int b) 24-bit RGB constructor.- Parameters:
r- Red.g- Green.b- Blue.
-
ColorAttr
- Parameters:
color- The color object.- See Also:
-
-
Method Details
-
getColorAsObject
-
isRGB
public boolean isRGB()Checks if the attribute contains an RGB color.- Returns:
- The boolean.
-
seqPrefix
Generates a sequence prefix. -
sequence
-
code
Description copied from class:AnsiAttrReturns/generates the ANSI escape code of the attribute.
-