java.lang.Object
com.github.rvesse.airline.io.colors.Color256
- All Implemented Interfaces:
AnsiColorProvider
256 colour i.e. palette of 256 colors that most modern terminals will support
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
checkColor
(int c) boolean
Gets the ANSI control code for setting the background colourprivate String
getAnsiColorCode
(int mode) Gets the ANSI control code for setting the foreground colourtoString()
boolean
Gets whether extended colours are used as this will affect the ANSI reset sequence that needs to be used
-
Field Details
-
color
private final int color
-
-
Constructor Details
-
Color256
public Color256(int color)
-
-
Method Details
-
checkColor
private int checkColor(int c) -
getAnsiForegroundControlCode
Description copied from interface:AnsiColorProvider
Gets the ANSI control code for setting the foreground colour- Specified by:
getAnsiForegroundControlCode
in interfaceAnsiColorProvider
- Returns:
- Foreground control code
-
getAnsiBackgroundControlCode
Description copied from interface:AnsiColorProvider
Gets the ANSI control code for setting the background colour- Specified by:
getAnsiBackgroundControlCode
in interfaceAnsiColorProvider
- Returns:
- Background control code
-
usesExtendedColors
public boolean usesExtendedColors()Description copied from interface:AnsiColorProvider
Gets whether extended colours are used as this will affect the ANSI reset sequence that needs to be used- Specified by:
usesExtendedColors
in interfaceAnsiColorProvider
- Returns:
- True if extended colours are used, false otherwise
-
getAnsiColorCode
-
toString
-
equals
-