Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text.Colour.Code
Synopsis
- asciiEscape :: Char
- csiStart :: Char
- csiDelimiter :: Char
- newtype CSI = SGR [SGR]
- renderCSIUtf8BS :: CSI -> ByteString
- renderCSIText :: CSI -> Text
- renderCSILazyText :: CSI -> Text
- renderCSI :: CSI -> Builder
- data SGR
- renderCSIParams :: [Word8] -> Builder
- sgrToCSIParams :: SGR -> [Word8]
- data Underlining
- data Blinking
- data ConsoleIntensity
- data ColourIntensity
- data ConsoleLayer
- data TerminalColour
- terminalColourSGRParameter :: TerminalColour -> Word8
- terminalColourFromIndex :: Word8 -> Maybe TerminalColour
Documentation
asciiEscape :: Char Source #
csiDelimiter :: Char Source #
renderCSIUtf8BS :: CSI -> ByteString Source #
Render a CSI directly to ByteString
using UTF8.
You probably want to use renderCSI
instead.
This is just for testing.
renderCSIText :: CSI -> Text Source #
renderCSILazyText :: CSI -> Text Source #
Constructors
Instances
renderCSIParams :: [Word8] -> Builder Source #
sgrToCSIParams :: SGR -> [Word8] Source #
data Underlining Source #
ANSI text underlining
Constructors
SingleUnderline | |
DoubleUnderline | |
NoUnderline |
Instances
Bounded Underlining Source # | |||||
Defined in Text.Colour.Code | |||||
Enum Underlining Source # | |||||
Defined in Text.Colour.Code Methods succ :: Underlining -> Underlining # pred :: Underlining -> Underlining # toEnum :: Int -> Underlining # fromEnum :: Underlining -> Int # enumFrom :: Underlining -> [Underlining] # enumFromThen :: Underlining -> Underlining -> [Underlining] # enumFromTo :: Underlining -> Underlining -> [Underlining] # enumFromThenTo :: Underlining -> Underlining -> Underlining -> [Underlining] # | |||||
Generic Underlining Source # | |||||
Defined in Text.Colour.Code Associated Types
| |||||
Show Underlining Source # | |||||
Defined in Text.Colour.Code Methods showsPrec :: Int -> Underlining -> ShowS # show :: Underlining -> String # showList :: [Underlining] -> ShowS # | |||||
Eq Underlining Source # | |||||
Defined in Text.Colour.Code | |||||
Validity Underlining Source # | |||||
Defined in Text.Colour.Code Methods validate :: Underlining -> Validation # | |||||
type Rep Underlining Source # | |||||
Defined in Text.Colour.Code type Rep Underlining = D1 ('MetaData "Underlining" "Text.Colour.Code" "safe-coloured-text-0.3.0.2-1FkhrtuVq3jTh8CGD2UQe" 'False) (C1 ('MetaCons "SingleUnderline" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DoubleUnderline" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoUnderline" 'PrefixI 'False) (U1 :: Type -> Type))) |
ANSI text blinking
Constructors
SlowBlinking | |
RapidBlinking | |
NoBlinking |
Instances
Bounded Blinking Source # | |||||
Enum Blinking Source # | |||||
Generic Blinking Source # | |||||
Defined in Text.Colour.Code Associated Types
| |||||
Show Blinking Source # | |||||
Eq Blinking Source # | |||||
Validity Blinking Source # | |||||
Defined in Text.Colour.Code Methods validate :: Blinking -> Validation # | |||||
type Rep Blinking Source # | |||||
Defined in Text.Colour.Code type Rep Blinking = D1 ('MetaData "Blinking" "Text.Colour.Code" "safe-coloured-text-0.3.0.2-1FkhrtuVq3jTh8CGD2UQe" 'False) (C1 ('MetaCons "SlowBlinking" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RapidBlinking" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoBlinking" 'PrefixI 'False) (U1 :: Type -> Type))) |
data ConsoleIntensity Source #
ANSI general console intensity: usually treated as setting the font style
(e.g. BoldIntensity
causes text to be bold)
Constructors
BoldIntensity | |
FaintIntensity | |
NormalIntensity |
Instances
Bounded ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code | |||||
Enum ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code Methods succ :: ConsoleIntensity -> ConsoleIntensity # pred :: ConsoleIntensity -> ConsoleIntensity # toEnum :: Int -> ConsoleIntensity # fromEnum :: ConsoleIntensity -> Int # enumFrom :: ConsoleIntensity -> [ConsoleIntensity] # enumFromThen :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity] # enumFromTo :: ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity] # enumFromThenTo :: ConsoleIntensity -> ConsoleIntensity -> ConsoleIntensity -> [ConsoleIntensity] # | |||||
Generic ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code Associated Types
Methods from :: ConsoleIntensity -> Rep ConsoleIntensity x # to :: Rep ConsoleIntensity x -> ConsoleIntensity # | |||||
Show ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code Methods showsPrec :: Int -> ConsoleIntensity -> ShowS # show :: ConsoleIntensity -> String # showList :: [ConsoleIntensity] -> ShowS # | |||||
Eq ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code Methods (==) :: ConsoleIntensity -> ConsoleIntensity -> Bool # (/=) :: ConsoleIntensity -> ConsoleIntensity -> Bool # | |||||
Validity ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code Methods validate :: ConsoleIntensity -> Validation # | |||||
type Rep ConsoleIntensity Source # | |||||
Defined in Text.Colour.Code type Rep ConsoleIntensity = D1 ('MetaData "ConsoleIntensity" "Text.Colour.Code" "safe-coloured-text-0.3.0.2-1FkhrtuVq3jTh8CGD2UQe" 'False) (C1 ('MetaCons "BoldIntensity" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FaintIntensity" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NormalIntensity" 'PrefixI 'False) (U1 :: Type -> Type))) |
data ColourIntensity Source #
ANSI's standard colours come in two intensities
Instances
Bounded ColourIntensity Source # | |||||
Defined in Text.Colour.Code | |||||
Enum ColourIntensity Source # | |||||
Defined in Text.Colour.Code Methods succ :: ColourIntensity -> ColourIntensity # pred :: ColourIntensity -> ColourIntensity # toEnum :: Int -> ColourIntensity # fromEnum :: ColourIntensity -> Int # enumFrom :: ColourIntensity -> [ColourIntensity] # enumFromThen :: ColourIntensity -> ColourIntensity -> [ColourIntensity] # enumFromTo :: ColourIntensity -> ColourIntensity -> [ColourIntensity] # enumFromThenTo :: ColourIntensity -> ColourIntensity -> ColourIntensity -> [ColourIntensity] # | |||||
Generic ColourIntensity Source # | |||||
Defined in Text.Colour.Code Associated Types
Methods from :: ColourIntensity -> Rep ColourIntensity x # to :: Rep ColourIntensity x -> ColourIntensity # | |||||
Show ColourIntensity Source # | |||||
Defined in Text.Colour.Code Methods showsPrec :: Int -> ColourIntensity -> ShowS # show :: ColourIntensity -> String # showList :: [ColourIntensity] -> ShowS # | |||||
Eq ColourIntensity Source # | |||||
Defined in Text.Colour.Code Methods (==) :: ColourIntensity -> ColourIntensity -> Bool # (/=) :: ColourIntensity -> ColourIntensity -> Bool # | |||||
Validity ColourIntensity Source # | |||||
Defined in Text.Colour.Code Methods validate :: ColourIntensity -> Validation # | |||||
type Rep ColourIntensity Source # | |||||
data ConsoleLayer Source #
ANSI colours can be set on two different layers
Constructors
Foreground | |
Background |
Instances
Bounded ConsoleLayer Source # | |||||
Defined in Text.Colour.Code | |||||
Enum ConsoleLayer Source # | |||||
Defined in Text.Colour.Code Methods succ :: ConsoleLayer -> ConsoleLayer # pred :: ConsoleLayer -> ConsoleLayer # toEnum :: Int -> ConsoleLayer # fromEnum :: ConsoleLayer -> Int # enumFrom :: ConsoleLayer -> [ConsoleLayer] # enumFromThen :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer] # enumFromTo :: ConsoleLayer -> ConsoleLayer -> [ConsoleLayer] # enumFromThenTo :: ConsoleLayer -> ConsoleLayer -> ConsoleLayer -> [ConsoleLayer] # | |||||
Generic ConsoleLayer Source # | |||||
Defined in Text.Colour.Code Associated Types
| |||||
Show ConsoleLayer Source # | |||||
Defined in Text.Colour.Code Methods showsPrec :: Int -> ConsoleLayer -> ShowS # show :: ConsoleLayer -> String # showList :: [ConsoleLayer] -> ShowS # | |||||
Eq ConsoleLayer Source # | |||||
Defined in Text.Colour.Code | |||||
Validity ConsoleLayer Source # | |||||
Defined in Text.Colour.Code Methods validate :: ConsoleLayer -> Validation # | |||||
type Rep ConsoleLayer Source # | |||||
data TerminalColour Source #
Instances
Bounded TerminalColour Source # | |||||
Defined in Text.Colour.Code | |||||
Enum TerminalColour Source # | |||||
Defined in Text.Colour.Code Methods succ :: TerminalColour -> TerminalColour # pred :: TerminalColour -> TerminalColour # toEnum :: Int -> TerminalColour # fromEnum :: TerminalColour -> Int # enumFrom :: TerminalColour -> [TerminalColour] # enumFromThen :: TerminalColour -> TerminalColour -> [TerminalColour] # enumFromTo :: TerminalColour -> TerminalColour -> [TerminalColour] # enumFromThenTo :: TerminalColour -> TerminalColour -> TerminalColour -> [TerminalColour] # | |||||
Generic TerminalColour Source # | |||||
Defined in Text.Colour.Code Associated Types
Methods from :: TerminalColour -> Rep TerminalColour x # to :: Rep TerminalColour x -> TerminalColour # | |||||
Show TerminalColour Source # | |||||
Defined in Text.Colour.Code Methods showsPrec :: Int -> TerminalColour -> ShowS # show :: TerminalColour -> String # showList :: [TerminalColour] -> ShowS # | |||||
Eq TerminalColour Source # | |||||
Defined in Text.Colour.Code Methods (==) :: TerminalColour -> TerminalColour -> Bool # (/=) :: TerminalColour -> TerminalColour -> Bool # | |||||
Validity TerminalColour Source # | |||||
Defined in Text.Colour.Code Methods validate :: TerminalColour -> Validation # | |||||
type Rep TerminalColour Source # | |||||
Defined in Text.Colour.Code type Rep TerminalColour = D1 ('MetaData "TerminalColour" "Text.Colour.Code" "safe-coloured-text-0.3.0.2-1FkhrtuVq3jTh8CGD2UQe" 'False) (((C1 ('MetaCons "Black" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Red" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Green" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Yellow" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Blue" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Magenta" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cyan" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "White" 'PrefixI 'False) (U1 :: Type -> Type)))) |