paint-1.0.0: Colorization of text for command-line output

Copyright(c) 2017 Daniel Lovasko
LicenseBSD2
MaintainerDaniel Lovasko <daniel.lovasko@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Text.Paint

Contents

Description

 

Synopsis

Documentation

data Color Source #

Foreground and background color.

Constructors

Black

black

Red

red

Green

green

Yellow

yellow

Blue

blue

Magenta

magenta

Cyan

cyan

LightGray

light gray

DarkGray

dark gray

LightRed

light red

LightGreen

light green

LightYellow

light yellow

LightBlue

light blue

LightMagenta

light magenta

LightCyan

light cyan

White

white

Default

default setting

data Flag Source #

Various flags applicable to the text.

Constructors

Bold

bold text (sometimes lighter)

Underline

underlined text

Blink

blinking (<150 BPM)

Instances

Eq Flag Source # 

Methods

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

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

Ord Flag Source # 

Methods

compare :: Flag -> Flag -> Ordering #

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

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

(>) :: Flag -> Flag -> Bool #

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

max :: Flag -> Flag -> Flag #

min :: Flag -> Flag -> Flag #

Show Flag Source # 

Methods

showsPrec :: Int -> Flag -> ShowS #

show :: Flag -> String #

showList :: [Flag] -> ShowS #

data Paint Source #

Coloring scheme containing foreground and background layers, and a setting for text styling.

Constructors

Paint Color Color [Flag] 

paint Source #

Arguments

:: Paint

coloring scheme

-> Text

plain text

-> Text

colorized text

Apply a color scheme to a text instance.