basement-0.0.8: Foundation scrap box of array & string

LicenseBSD-style
MaintainerVincent Hanquez <[email protected]>
Safe HaskellNone
LanguageHaskell2010

Basement.Terminal.ANSI

Contents

Description

ANSI Terminal escape for cursor and attributes manipulations

On Unix system, it should be supported by most terminal emulators.

On Windows system, all escape sequences are empty for maximum compatibility purpose, and easy implementation. newer version of Windows 10 supports ANSI escape now, but we'll need some kind of detection.

Synopsis

Types

type ColorComponent = Zn64 8 Source #

Simple color component on 8 color terminal (maximum compatibility)

type GrayComponent = Zn64 24 Source #

Gray color compent on 256colors terminals

type RGBComponent = Zn64 6 Source #

Color compent on 256colors terminals

Simple ANSI escape factory functions

sgrReset :: Escape Source #

All attribute off

sgrForeground :: ColorComponent -> Bool -> Escape Source #

8 Colors + Bold attribute for foreground

sgrBackground :: ColorComponent -> Bool -> Escape Source #

8 Colors + Bold attribute for background

sgrForegroundColor216 Source #

Arguments

:: RGBComponent

Red component

-> RGBComponent

Green component

-> RGBComponent

Blue component

-> Escape 

sgrBackgroundColor216 Source #

Arguments

:: RGBComponent

Red component

-> RGBComponent

Green component

-> RGBComponent

Blue component

-> Escape