ansi-terminal-0.4.0: System/Console/ANSI/Common.hs
module System.Console.ANSI.Common where
-- | ANSI colors: come in various intensities, which are controlled by 'ColorIntensity'
data Color = Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
deriving (Bounded, Enum, Show)
-- | ANSI colors come in two intensities
data ColorIntensity = Dull
| Vivid
deriving (Enum, Show)
-- | ANSI colors can be set on two different layers
data ConsoleLayer = Foreground
| Background
deriving (Enum, Show)
-- | ANSI blink speeds: values other than 'NoBlink' are not widely supported
data BlinkSpeed = SlowBlink -- ^ Less than 150 blinks per minute
| RapidBlink -- ^ More than 150 blinks per minute
| NoBlink
-- | ANSI text underlining
data Underlining = SingleUnderline
| DoubleUnderline -- ^ Not widely supported
| NoUnderline
-- | ANSI general console intensity: usually treated as setting the font style (e.g. 'BoldIntensity' causes text to be bold)
data ConsoleIntensity = BoldIntensity
| FaintIntensity -- ^ Not widely supported: sometimes treated as concealing text
| NormalIntensity
-- | ANSI Select Graphic Rendition command
data SGR = Reset
| SetConsoleIntensity ConsoleIntensity
| SetItalicized Bool -- ^ Not widely supported: sometimes treated as swapping foreground and background
| SetUnderlining Underlining
| SetBlinkSpeed BlinkSpeed
| SetVisible Bool -- ^ Not widely supported
| SetSwapForegroundBackground Bool
| SetColor ConsoleLayer ColorIntensity Color