colourista: Convenient interface for printing colourful messages

[ ansi, library, mpl, terminal ] [ Propose Tags ]

Convenient interface for printing colourful messages based on the ansi-terminal library.

[Skip to Readme]


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,
Change log
Dependencies ansi-terminal (>=0.10 && <1.2), base (>= && <4.21), bytestring (>=0.10 && <0.13), text (>= && <2.2) [details]
License MPL-2.0
Copyright 2020-2022 Kowainik
Author Veronika Romashkina, Dmitrii Kovanikov
Maintainer Kowainik <>
Revised Revision 5 made by tomjaguarpaw at 2024-05-11T16:24:23Z
Category Terminal, ANSI
Home page
Bug tracker
Source repo head: git clone
Uploaded by vrom911 at 2022-10-05T21:38:08Z
Distributions Arch:, Fedora:, LTSHaskell:, NixOS:, Stackage:, openSUSE:
Reverse Dependencies 11 direct, 5 indirect [details]
Downloads 7031 total (132 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for colourista-

[back to package description]



GitHub CI Hackage Stackage Lts Stackage Nightly MPL-2.0 license

«The best colour in the whole world is the one that looks good on you.»

— Coco Chanel

colourista is the library that provides a convenient interface for printing colourful messages to the terminal. It is based on ansi-terminal, however, in contradistinction to this Haskell library, colourista is a high-level wrapper focused on easily achieved output modification without low-level setup.


The two main functions that colourista provides are:

  • formatWith — the function that formats pure output by applying provided formatting codes. It works with polymorphic strings.
  • formattedMessage — the function that outputs the formatted output directly into the terminal (working in IO with Text).

The library also provides a set of different pure and impure helpers for the colouring and emphasis.



How to use

colourista is compatible with the latest GHC compiler versions starting from 8.2.2.

In order to start using colourista in your project, you will need to set it up with the three easy steps:

  1. Add the dependency on colourista in your project's .cabal file. For this, you should modify the build-depends section by adding the name of this library. After the adjustment, this section could look like this:

    build-depends: colourista ^>= LATEST_VERSION
                 , ...
  2. In the module where you wish to use the colourful output with colourista, you should add the import:

    import Colourista (...)
  3. Now you can use the functions from the library. For example:

    import qualified Data.Text as Text
    main :: IO ()
    main = successMessage $ Text.pack "All set up!"

Usage with Stack

If colourista is not available on your current Stackage resolver yet, fear not! You can still use it from Hackage by adding the following to the extra-deps section of your stack.yaml file:

  - colourista-
  - ...

Then you can add it as a dependency in your package.yaml file as usual:

    - colourista



Icons made by Freepik from is licensed by CC 3.0 BY.