Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the encoding of colours for rendering on a terminal; https://en.wikipedia.org/wiki/ANSI_escape_code.
Synopsis
- type GraphicsRendition = String
- selectGraphicsRendition :: IsBold -> ANSIColourCode -> GraphicsRendition
- bracket :: GraphicsRendition -> String -> ShowS
- mkFgColourCode :: PhysicalColour -> ANSIColourCode
- mkBgColourCode :: PhysicalColour -> ANSIColourCode
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.