bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Colour.ANSIColourCode

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the encoding of colours for rendering on a terminal; https://en.wikipedia.org/wiki/ANSI_escape_code.
Synopsis

Types

Type-synonyms

type GraphicsRendition = String Source #

An escape-sequence used to control a terminal.

Functions

selectGraphicsRendition :: IsBold -> ANSIColourCode -> GraphicsRendition Source #

Generate the escape-sequence required to change a terminal to the specified physical colour.

bracket :: GraphicsRendition -> String -> ShowS Source #

Render the specified string according to instructions, then revert to the default.

Constructors

mkFgColourCode :: PhysicalColour -> ANSIColourCode Source #

Constructor: offset the specified colour-code, so that it applies to the foreground.

mkBgColourCode :: PhysicalColour -> ANSIColourCode Source #

Constructor: offset the specified colour-code, so that it applies to the background.