Package com.diogonunes.jcolor
Class Attribute
java.lang.Object
com.diogonunes.jcolor.Attribute
Abstracts ANSI codes with intuitive names. It maps a description (e.g. RED_TEXT) with a code (e.g. 31).
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic AttributeBACK_COLOR(int colorNumber) static AttributeBACK_COLOR(int r, int g, int b) static Attributestatic Attributestatic Attributestatic Attributestatic AttributeBOLD()static Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic Attributestatic AttributeCLEAR()static Attributestatic Attributestatic Attributestatic AttributeDIM()static Attributestatic AttributeFRAMED()static Attributestatic Attributestatic AttributeHIDDEN()static AttributeITALIC()static Attributestatic Attributestatic AttributeNONE()static Attributestatic Attributestatic AttributeRED_BACK()static AttributeRED_TEXT()static AttributeREVERSE()static Attributestatic Attributestatic Attributestatic AttributeTEXT_COLOR(int colorNumber) static AttributeTEXT_COLOR(int r, int g, int b) abstract StringtoString()static Attributestatic Attributestatic Attributestatic Attributestatic Attribute
- 
Constructor Details- 
Attributepublic Attribute()
 
- 
- 
Method Details- 
toString
- 
NONE
- 
CLEAR- Returns:
- Clears any format. Restores the terminal's default format.
 
- 
BOLD
- 
SATURATED- Returns:
- Alias of BOLD().
 
- 
DIM
- 
DESATURATED- Returns:
- Alias of DIM().
 
- 
ITALIC
- 
UNDERLINE
- 
SLOW_BLINK
- 
RAPID_BLINK
- 
REVERSE
- 
HIDDEN
- 
STRIKETHROUGH
- 
FRAMED
- 
ENCIRCLED
- 
OVERLINED
- 
BLACK_TEXT
- 
RED_TEXT
- 
GREEN_TEXT
- 
YELLOW_TEXT
- 
BLUE_TEXT
- 
MAGENTA_TEXT
- 
CYAN_TEXT
- 
WHITE_TEXT
- 
BLACK_BACK
- 
RED_BACK
- 
GREEN_BACK
- 
YELLOW_BACK
- 
BLUE_BACK
- 
MAGENTA_BACK
- 
CYAN_BACK
- 
WHITE_BACK
- 
BRIGHT_BLACK_TEXT
- 
BRIGHT_RED_TEXT
- 
BRIGHT_GREEN_TEXT
- 
BRIGHT_YELLOW_TEXT
- 
BRIGHT_BLUE_TEXT
- 
BRIGHT_MAGENTA_TEXT
- 
BRIGHT_CYAN_TEXT
- 
BRIGHT_WHITE_TEXT
- 
BRIGHT_BLACK_BACK
- 
BRIGHT_RED_BACK
- 
BRIGHT_GREEN_BACK
- 
BRIGHT_YELLOW_BACK
- 
BRIGHT_BLUE_BACK
- 
BRIGHT_MAGENTA_BACK
- 
BRIGHT_CYAN_BACK
- 
BRIGHT_WHITE_BACK
- 
TEXT_COLOR- Parameters:
- colorNumber- A number (0-255) that represents an 8-bit color.
- Returns:
- An Attribute that represents a foreground with an 8-bit color.
 
- 
TEXT_COLOR- Parameters:
- r- A number (0-255) that represents the red component.
- g- A number (0-255) that represents the green component.
- b- A number (0-255) that represents the blue component.
- Returns:
- An Attribute that represents a foreground with a true color.
 
- 
BACK_COLOR- Parameters:
- colorNumber- A number (0-255) that represents an 8-bit color.
- Returns:
- An Attribute that represents a background with an 8-bit color.
 
- 
BACK_COLOR- Parameters:
- r- A number (0-255) that represents the red component.
- g- A number (0-255) that represents the green component.
- b- A number (0-255) that represents the blue component.
- Returns:
- An Attribute that represents a background with a true color.
 
 
-