text-ansi-0.3.0: Text styling for ANSI terminals.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Lazy.Builder.ANSI

Synopsis

Documentation

Text styling for ANSI terminals using SGR codes, as defined by the ECMA-48 standard.

Supports foreground/background color, bold/faint intensity, italic, single/double underline, strikethrough, frame, encircle, and overline escape sequences. Some styles may not work on your terminal.

Also features terminal detection, so redirecting styled output to a file will automatically strip the ANSI escape sequences.

Foreground color

black :: Builder -> Builder Source #

Black foreground.

red :: Builder -> Builder Source #

Red foreground.

green :: Builder -> Builder Source #

Green foreground.

yellow :: Builder -> Builder Source #

Yellow foreground.

blue :: Builder -> Builder Source #

Blue foreground.

magenta :: Builder -> Builder Source #

Magenta foreground.

cyan :: Builder -> Builder Source #

Cyan foreground.

white :: Builder -> Builder Source #

White foreground.

brightBlack :: Builder -> Builder Source #

Bright black foreground.

brightRed :: Builder -> Builder Source #

Bright red foreground.

brightGreen :: Builder -> Builder Source #

Bright green foreground.

brightYellow :: Builder -> Builder Source #

Bright yellow foreground.

brightBlue :: Builder -> Builder Source #

Bright blue foreground.

brightMagenta :: Builder -> Builder Source #

Bright magenta foreground.

brightCyan :: Builder -> Builder Source #

Bright cyan foreground.

brightWhite :: Builder -> Builder Source #

Bright white foreground.

rgb :: Word8 -> Word8 -> Word8 -> Builder -> Builder Source #

RGB foreground.

Background color

blackBg :: Builder -> Builder Source #

Black background.

redBg :: Builder -> Builder Source #

Red background.

greenBg :: Builder -> Builder Source #

Green background.

yellowBg :: Builder -> Builder Source #

Yellow background.

blueBg :: Builder -> Builder Source #

Blue background.

magentaBg :: Builder -> Builder Source #

Magenta background.

cyanBg :: Builder -> Builder Source #

Cyan background.

whiteBg :: Builder -> Builder Source #

White background.

brightBlackBg :: Builder -> Builder Source #

Bright black background.

brightRedBg :: Builder -> Builder Source #

Bright red background.

brightGreenBg :: Builder -> Builder Source #

Bright green background.

brightYellowBg :: Builder -> Builder Source #

Bright yellow background.

brightBlueBg :: Builder -> Builder Source #

Bright blue background.

brightMagentaBg :: Builder -> Builder Source #

Bright magenta background.

brightCyanBg :: Builder -> Builder Source #

Bright cyan background.

brightWhiteBg :: Builder -> Builder Source #

Bright white background.

rgbBg :: Word8 -> Word8 -> Word8 -> Builder -> Builder Source #

RGB background.

Style

bold :: Builder -> Builder Source #

Bold style (high intensity).

faint :: Builder -> Builder Source #

Faint style (low intensity).

italic :: Builder -> Builder Source #

Italic style.

underline :: Builder -> Builder Source #

U̲n̲d̲e̲r̲l̲i̲n̲e̲ style.

doubleUnderline :: Builder -> Builder Source #

D̳o̳u̳b̳l̳e̳ ̳u̳n̳d̳e̳r̳l̳i̳n̳e̳ style.

strikethrough :: Builder -> Builder Source #

S̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ style.

frame :: Builder -> Builder Source #

Frame style.

encircle :: Builder -> Builder Source #

Encircle style.

overline :: Builder -> Builder Source #

O̅v̅e̅r̅l̅i̅n̅e̅ style.