AnsiValue

com.geirolz.app.toolkit.console.AnsiValue
See theAnsiValue companion object
sealed trait AnsiValue

An ADT witch describes the ANSI values typed.

  • AnsiValue.F includes foreground colors
  • AnsiValue.B includes background colors
  • AnsiValue.S includes styles

You can combine multiple values with the combinators or with Monoid instance

 val value: AnsiValue = AnsiValue(
    foreground = AnsiValue.F.RED,
    foreground = AnsiValue.B.BLACK,
    style      = AnsiValue.S.BLINK
 )

 //or
 AnsiValue.F.RED
    .withBackground(AnsiValue.B.BLACK)
    .withStyle(AnsiValue.S.BLINK)

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class B
class F
class S

Members list

Value members

Concrete methods

def apply[T](msg: T)(implicit s: Show[T]): AnsiText
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def withStyle(s: S): AnsiValue

Abstract fields

val value: String

Concrete fields

lazy val background: B
lazy val foreground: F
lazy val style: S