ANSI escape codes providing control over text formatting and color on supporting text terminals.
==ANSI Style and Control Codes==
This group of escape codes provides control over text styling. For example, to turn on reverse video with bold and then turn off all styling embed these codes,
import io.AnsiColor._
object ColorDemo extends App {
println(s"${REVERSED}${BOLD}Hello 1979!${RESET}")
}
==Foreground and Background Colors==
Embedding ANSI color codes in text output will control the text foreground and background colors.
| Foreground | Background | |
|---|---|---|
| BLACK | BLACK_B | |
| RED | RED_B | |
| GREEN | GREEN_B | |
| YELLOW | YELLOW_B | |
| BLUE | BLUE_B | |
| MAGENTA | MAGENTA_B | |
| CYAN | CYAN_B | |
| WHITE | WHITE_B |
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
Members list
Grouped members
ANSI Style and Control Codes
ANSI blink
ANSI blink
Attributes
ANSI bold
ANSI bold
Attributes
ANSI invisible
ANSI invisible
Attributes
Reset ANSI styles
Reset ANSI styles
Attributes
ANSI reversed
ANSI reversed
Attributes
ANSI underlines
ANSI underlines
Attributes
ANSI Black
Foreground color for ANSI black
Foreground color for ANSI black
Attributes
Background color for ANSI black
Background color for ANSI black
Attributes
ANSI Red
Foreground color for ANSI red
Foreground color for ANSI red
Attributes
Background color for ANSI red
Background color for ANSI red
Attributes
ANSI Green
Foreground color for ANSI green
Foreground color for ANSI green
Attributes
Background color for ANSI green
Background color for ANSI green
Attributes
ANSI Yellow
Foreground color for ANSI yellow
Foreground color for ANSI yellow
Attributes
Background color for ANSI yellow
Background color for ANSI yellow
Attributes
ANSI Blue
Foreground color for ANSI blue
Foreground color for ANSI blue
Attributes
Background color for ANSI blue
Background color for ANSI blue
Attributes
ANSI Magenta
Foreground color for ANSI magenta
Foreground color for ANSI magenta
Attributes
Background color for ANSI magenta
Background color for ANSI magenta
Attributes
ANSI Cyan
Foreground color for ANSI cyan
Foreground color for ANSI cyan
Attributes
Background color for ANSI cyan
Background color for ANSI cyan