Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.io/AnsiColor

AnsiColor

scala.io.AnsiColor
See theAnsiColor companion object

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.

ForegroundBackground
BLACKBLACK_B
REDRED_B
GREENGREEN_B
YELLOWYELLOW_B
BLUEBLUE_B
MAGENTAMAGENTA_B
CYANCYAN_B
WHITEWHITE_B

Attributes

Companion
object
Source
AnsiColor.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Known subtypes
objectAnsiColor
objectConsole

Members list

Grouped members

ANSI Style and Control Codes

finalvalBLINK: "\u001b[5m"

ANSI blink

ANSI blink

Attributes

Source
AnsiColor.scala
finalvalBOLD: "\u001b[1m"

ANSI bold

ANSI bold

Attributes

Source
AnsiColor.scala
finalvalINVISIBLE: "\u001b[8m"

ANSI invisible

ANSI invisible

Attributes

Source
AnsiColor.scala
finalvalRESET: "\u001b[0m"

Reset ANSI styles

Reset ANSI styles

Attributes

Source
AnsiColor.scala
finalvalREVERSED: "\u001b[7m"

ANSI reversed

ANSI reversed

Attributes

Source
AnsiColor.scala
finalvalUNDERLINED: "\u001b[4m"

ANSI underlines

ANSI underlines

Attributes

Source
AnsiColor.scala

ANSI Black

 

finalvalBLACK: "\u001b[30m"

Foreground color for ANSI black

Foreground color for ANSI black

Attributes

Source
AnsiColor.scala
finalvalBLACK_B: "\u001b[40m"

Background color for ANSI black

Background color for ANSI black

Attributes

Source
AnsiColor.scala

ANSI Red

 

finalvalRED: "\u001b[31m"

Foreground color for ANSI red

Foreground color for ANSI red

Attributes

Source
AnsiColor.scala
finalvalRED_B: "\u001b[41m"

Background color for ANSI red

Background color for ANSI red

Attributes

Source
AnsiColor.scala

ANSI Green

 

finalvalGREEN: "\u001b[32m"

Foreground color for ANSI green

Foreground color for ANSI green

Attributes

Source
AnsiColor.scala
finalvalGREEN_B: "\u001b[42m"

Background color for ANSI green

Background color for ANSI green

Attributes

Source
AnsiColor.scala

ANSI Yellow

 

finalvalYELLOW: "\u001b[33m"

Foreground color for ANSI yellow

Foreground color for ANSI yellow

Attributes

Source
AnsiColor.scala
finalvalYELLOW_B: "\u001b[43m"

Background color for ANSI yellow

Background color for ANSI yellow

Attributes

Source
AnsiColor.scala

ANSI Blue

 

finalvalBLUE: "\u001b[34m"

Foreground color for ANSI blue

Foreground color for ANSI blue

Attributes

Source
AnsiColor.scala
finalvalBLUE_B: "\u001b[44m"

Background color for ANSI blue

Background color for ANSI blue

Attributes

Source
AnsiColor.scala

ANSI Magenta

 

finalvalMAGENTA: "\u001b[35m"

Foreground color for ANSI magenta

Foreground color for ANSI magenta

Attributes

Source
AnsiColor.scala
finalvalMAGENTA_B: "\u001b[45m"

Background color for ANSI magenta

Background color for ANSI magenta

Attributes

Source
AnsiColor.scala

ANSI Cyan

 

finalvalCYAN: "\u001b[36m"

Foreground color for ANSI cyan

Foreground color for ANSI cyan

Attributes

Source
AnsiColor.scala
finalvalCYAN_B: "\u001b[46m"

Background color for ANSI cyan

Background color for ANSI cyan

Attributes

Source
AnsiColor.scala

ANSI White

 

finalvalWHITE: "\u001b[37m"

Foreground color for ANSI white

Foreground color for ANSI white

Attributes

Source
AnsiColor.scala
finalvalWHITE_B: "\u001b[47m"

Background color for ANSI white

Background color for ANSI white

Attributes

Source
AnsiColor.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp