co-log-polysemy-formatting-0.1.1.0: A Polysemy logging effect for high quality (unstructured) logs.
Safe HaskellNone
LanguageHaskell2010

Colog.Polysemy.Formatting.Color

Description

 
Synopsis

Documentation

data Color #

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.

Constructors

Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 

Instances

Instances details
Bounded Color 
Instance details

Defined in System.Console.ANSI.Types

Enum Color 
Instance details

Defined in System.Console.ANSI.Types

Eq Color 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

Ord Color 
Instance details

Defined in System.Console.ANSI.Types

Methods

compare :: Color -> Color -> Ordering #

(<) :: Color -> Color -> Bool #

(<=) :: Color -> Color -> Bool #

(>) :: Color -> Color -> Bool #

(>=) :: Color -> Color -> Bool #

max :: Color -> Color -> Color #

min :: Color -> Color -> Color #

Read Color 
Instance details

Defined in System.Console.ANSI.Types

Show Color 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Ix Color 
Instance details

Defined in System.Console.ANSI.Types

data UseColor Source #

A Bool-isomorphic type for expressing whether output should use color or not.

Constructors

DoUseColor 
DontUseColor 

termColorSupport :: Handle -> IO UseColor Source #

Detect whether the terminal at the given handle (e.g. stdout) supports color output.

getWithFG Source #

Arguments

:: UseColor

Whether to actually use color, or ignore any given color.

-> Color

The color to set the foreground text to

-> Builder 
-> Builder 

Generate a function for setting the foreground color.