| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Hledger.Utils.Color
Description
Basic color helpers for prettifying console output.
Documentation
color :: ColorIntensity -> Color -> String -> String Source #
Wrap a string in ANSI codes to set and reset foreground colour.
bgColor :: ColorIntensity -> Color -> String -> String Source #
Wrap a string in ANSI codes to set and reset background colour.
ANSI's eight standard colors. They come in two intensities, which are
controlled by ColorIntensity. Many terminals allow the colors of the
standard palette to be customised, so that, for example,
setSGR [ SetColor Foreground Vivid Green ] may not result in bright green
characters.
Instances
| Bounded Color | |
Defined in System.Console.ANSI.Types | |
| Enum Color | |
| Eq Color | |
| Ord Color | |
| Read Color | |
Defined in System.Console.ANSI.Types | |
| Show Color | |
| Ix Color | |
data ColorIntensity Source #
ANSI's standard colors come in two intensities