Modulebasement-0.0.16Haskell2010
Basement.Terminal.ANSI
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.
- 5 types
- 23 values
- Packagebasement-0.0.16
- Exports28
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceANSI.hs
Types
5 declarationsSimple color component on 8 color terminal (maximum compatibility)
Gray color compent on 256colors terminals
Color compent on 256colors terminals
Simple ANSI escape factory functions
23 declarationsAll attribute off
8 Colors + Bold attribute for foreground
8 Colors + Bold attribute for background
value
sgrForegroundColor216 :: RGBComponentRed component
-> RGBComponentGreen component
-> RGBComponentBlue component
-> Escape
value
sgrBackgroundColor216 :: RGBComponentRed component
-> RGBComponentGreen component
-> RGBComponentBlue component
-> Escape