java.lang.Object
com.googlecode.lanterna.TextColor.Factory
- Enclosing interface:
TextColor
Utility class to instantiate colors from other types and definitions
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextColor
fromString
(String value) Parses a string into a color.
-
Field Details
-
INDEXED_COLOR
-
RGB_COLOR
-
-
Constructor Details
-
Factory
private Factory()
-
-
Method Details
-
fromString
Parses a string into a color. The string can have one of three formats:- blue - Constant value from the
TextColor.ANSI
enum - #17 - Hash character followed by one to three numbers; picks the color with that index from the 256 color palette
- #1a1a1a - Hash character followed by three hex-decimal tuples; creates an RGB color entry by parsing the tuples as Red, Green and Blue
- Parameters:
value
- The string value to parse- Returns:
- A
TextColor
that is either anTextColor.ANSI
, anTextColor.Indexed
or anTextColor.RGB
depending on the format of the string, ornull
ifvalue
isnull
.
- blue - Constant value from the
-