pretty-terminal-0.1.0.0: Styling and coloring terminal output with ANSI escape sequences.

Safe HaskellSafe
LanguageHaskell2010

System.Console.Pretty

Description

Useful helpers to style and color text with ANSI escape sequences.

Synopsis

Documentation

data Color Source #

Colors for an ANSI terminal

class Pretty a where Source #

A class to color and style

Minimal complete definition

colorize, style

Methods

color :: Color -> a -> a Source #

Helper to set foreground color

bgColor :: Color -> a -> a Source #

Helper to set background color

colorize :: Section -> Color -> a -> a Source #

Set the color of the (fg/bg) with the color

style :: Style -> a -> a Source #

Set the style

data Section Source #

A section to be colored, either foreground or background.

Constructors

Foreground 
Background 

data Style Source #

SGR paramaters, aka text styles for an ANSI terminal

supportsPretty :: IO Bool Source #

Whether or not the current terminal supports pretty-terminal