serokell-util-0.8.0: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.ANSI

Description

Functions for working with ANSI-colored text.

Synopsis

Documentation

data Color :: * #

ANSI colors: come in various intensities, which are controlled by ColorIntensity

Constructors

Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 

colorize :: Color -> Text -> Text Source #

Prettify Text message with Vivid color.

colorizeDull :: Color -> Text -> Text Source #

Colorize text using Dull palete (in contrast to colorize which uses Vivid palete)

withColoredMessages :: MonadIO m => Color -> Text -> m a -> m a Source #

Write colored message, do some action, write colored message. Intended for debug only.