Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
System.Console.Pretty
Description
Useful helpers to style and color text with ANSI escape sequences.
Synopsis
- data Color
- class Pretty a where
- data Section
- data Style
- supportsPretty :: IO Bool
Documentation
A class to color and 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
A section to be colored, either foreground or background.
Constructors
Foreground | |
Background |
supportsPretty :: IO Bool Source #
Whether or not the current terminal supports pretty-terminal