Colourista.IO

colourista-0.1.0.2: Convenient interface for printing colourful messages

Copyright | (c) 2020-2022 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Safe Haskell | None
Language | Haskell2010

Colourista.IO

Contents

- Colour
  - Direct
  - Aliases with unicode indicators
- Emphasis
- General purpose

Description

Functions to output formatted `Text` directly to terminal.

Synopsis

- redMessage :: Text -> IO ()
- greenMessage :: Text -> IO ()
- blueMessage :: Text -> IO ()
- yellowMessage :: Text -> IO ()
- blackMessage :: Text -> IO ()
- whiteMessage :: Text -> IO ()
- magentaMessage :: Text -> IO ()
- cyanMessage :: Text -> IO ()
- successMessage :: Text -> IO ()
- infoMessage :: Text -> IO ()
- skipMessage :: Text -> IO ()
- warningMessage :: Text -> IO ()
- errorMessage :: Text -> IO ()
- boldMessage :: Text -> IO ()
- italicMessage :: Text -> IO ()
- formattedMessage :: [Text] -> Text -> IO ()

# Colour

## Direct

redMessage :: Text -> IO () #

Print `Text` coloured in `red`.

greenMessage :: Text -> IO () #

Print `Text` coloured in `green`.

blueMessage :: Text -> IO () #

Print `Text` coloured in `blue`.

yellowMessage :: Text -> IO () #

Print `Text` coloured in `yellow`.

blackMessage :: Text -> IO () #

Print `Text` coloured in `black`.

whiteMessage :: Text -> IO () #

Print `Text` coloured in `white`.

magentaMessage :: Text -> IO () #

Print `Text` coloured in `magenta`.

cyanMessage :: Text -> IO () #

Print `Text` coloured in `cyan`.

## Aliases with unicode indicators

successMessage :: Text -> IO () #

Similar to `greenMessage`, but add unicode indicator.

infoMessage :: Text -> IO () #

Similar to `blueMessage`, but add unicode indicator.

skipMessage :: Text -> IO () #

Similar to `cyanMessage`, but add unicode indicator.

warningMessage :: Text -> IO () #

Similar to `yellowMessage`, but add unicode indicator.

errorMessage :: Text -> IO () #

Similar to `redMessage`, but add unicode indicator.

# Emphasis

boldMessage :: Text -> IO () #

Print `Text` emphasized with `bold`.

italicMessage :: Text -> IO () #

Print `Text` emphasized with `italic`.

# General purpose

formattedMessage :: [Text] -> Text -> IO () #

Print message with specified list of formatting options. See `formatWith` for more details. If this function takes empty list, no formatting is applied.