Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
System.Console.Pretty
Description
Useful helpers to style and color text with ANSI escape sequences.
Documentation
Colors for an ANSI terminal
Instances
Enum Color Source # | |
Defined in System.Console.Pretty |
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 |
SGR paramaters, aka text styles for an ANSI terminal
Instances
Enum Style Source # | |
Defined in System.Console.Pretty |
supportsPretty :: IO Bool Source #
Whether or not the current terminal supports pretty-terminal