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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Ansi8BitColorbackground(int code) Return a background ANSI color code instance for the given code.booleanstatic Ansi8BitColorforeground(int code) Return a foreground ANSI color code instance for the given code.inthashCode()toString()
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toStringin interfaceAnsiElement- Overrides:
toStringin 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
-