Package org.springframework.boot.ansi
Class Ansi8BitColor
java.lang.Object
org.springframework.boot.ansi.Ansi8BitColor
- All Implemented Interfaces:
AnsiElement
AnsiElement
implementation for ANSI 8-bit foreground or background color codes.- Since:
- 2.2.0
- Author:
- Toshiaki Maki, Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Ansi8BitColor
background
(int code) Return a background ANSI color code instance for the given code.boolean
static Ansi8BitColor
foreground
(int code) Return a foreground ANSI color code instance for the given code.int
hashCode()
toString()
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toString
in interfaceAnsiElement
- Overrides:
toString
in classObject
- Returns:
- the ANSI escape code
-
foreground
Return a foreground ANSI color code instance for the given code.- Parameters:
code
- the color code- Returns:
- an ANSI color code instance
-
background
Return a background ANSI color code instance for the given code.- Parameters:
code
- the color code- Returns:
- an ANSI color code instance
-