Safe Haskell | None |
---|---|
Language | Haskell2010 |
Colours and text attributes.
Synopsis
- data Color
- defFG :: Color
- isBright :: Color -> Bool
- darkCol :: [Color]
- brightCol :: [Color]
- stdCol :: [Color]
- legalFgCol :: [Color]
- colorToRGB :: Color -> Text
- data Highlight
- data Attr = Attr {}
- highlightToColor :: Highlight -> Color
- defAttr :: Attr
- data AttrChar = AttrChar {}
- newtype AttrCharW32 = AttrCharW32 {}
- attrCharToW32 :: AttrChar -> AttrCharW32
- attrCharFromW32 :: AttrCharW32 -> AttrChar
- fgFromW32 :: AttrCharW32 -> Color
- bgFromW32 :: AttrCharW32 -> Highlight
- charFromW32 :: AttrCharW32 -> Char
- attrFromW32 :: AttrCharW32 -> Attr
- attrEnumFromW32 :: AttrCharW32 -> Int
- spaceAttrW32 :: AttrCharW32
- retAttrW32 :: AttrCharW32
- attrChar2ToW32 :: Color -> Char -> AttrCharW32
- attrChar1ToW32 :: Char -> AttrCharW32
Colours
Colours supported by the major frontends.
Black | |
Red | |
Green | |
Brown | |
Blue | |
Magenta | |
Cyan | |
White | |
AltWhite | |
BrBlack | |
BrRed | |
BrGreen | |
BrYellow | |
BrBlue | |
BrMagenta | |
BrCyan | |
BrWhite |
Instances
legalFgCol :: [Color] Source #
Colour sets.
colorToRGB :: Color -> Text Source #
Translationg to heavily modified Linux console color RGB values.
Warning: SDL frontend sadly duplicates this code.
Complete text attributes
Additional map cell highlight, e.g., a colorful square around the cell or a colorful background.
Note: the highlight underscored by the terminal cursor is the maximal element of this type present of this screen.
HighlightNone | |
HighlightGreen | |
HighlightBlue | |
HighlightGrey | |
HighlightWhite | |
HighlightMagenta | |
HighlightRed | |
HighlightYellow | |
HighlightYellowAim | |
HighlightRedAim |
Instances
Text attributes: foreground color and highlight.
highlightToColor :: Highlight -> Color Source #
Characters with attributes
Character to display, with its attribute.
newtype AttrCharW32 Source #
Optimized representation of AttrChar
.
Instances
attrCharToW32 :: AttrChar -> AttrCharW32 Source #
fgFromW32 :: AttrCharW32 -> Color Source #
bgFromW32 :: AttrCharW32 -> Highlight Source #
charFromW32 :: AttrCharW32 -> Char Source #
attrFromW32 :: AttrCharW32 -> Attr Source #
attrEnumFromW32 :: AttrCharW32 -> Int Source #
attrChar2ToW32 :: Color -> Char -> AttrCharW32 Source #
attrChar1ToW32 :: Char -> AttrCharW32 Source #