Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Definition.Color
Description
Colours and text attributes.
Synopsis
- data Color
- defFG :: Color
- isBright :: Color -> Bool
- darkCol :: [Color]
- brightCol :: [Color]
- stdCol :: [Color]
- legalFgCol :: [Color]
- cVeryBadEvent :: Color
- cBadEvent :: Color
- cRisk :: Color
- cGraveRisk :: Color
- cVeryGoodEvent :: Color
- cGoodEvent :: Color
- cVista :: Color
- cSleep :: Color
- cWakeUp :: Color
- cGreed :: Color
- cNeutralEvent :: Color
- cRareNeutralEvent :: Color
- cIdentification :: Color
- cMeta :: Color
- cBoring :: Color
- cGameOver :: Color
- cTutorialHint :: 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
- spaceAttrW32 :: AttrCharW32
- nbspAttrW32 :: AttrCharW32
- trimmedLineAttrW32 :: AttrCharW32
- attrChar2ToW32 :: Color -> Char -> AttrCharW32
- attrChar1ToW32 :: Char -> AttrCharW32
Colours
Colours supported by the major frontends.
Constructors
Black | |
Red | |
Green | |
Brown | |
Blue | |
Magenta | |
Cyan | |
White | |
AltWhite | |
BrBlack | |
BrRed | |
BrGreen | |
BrYellow | |
BrBlue | |
BrMagenta | |
BrCyan | |
BrWhite |
Instances
legalFgCol :: [Color] Source #
Colour sets. Sorted.
cGraveRisk :: Color Source #
cGoodEvent :: Color Source #
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.
Warning: the highlight underscored by the terminal cursor is the maximal element of this type present on a screen, so don't add new highlights to the end.
Constructors
Instances
Bounded Highlight Source # | |
Enum Highlight Source # | |
Defined in Game.LambdaHack.Definition.Color Methods succ :: Highlight -> Highlight # pred :: Highlight -> Highlight # fromEnum :: Highlight -> Int # enumFrom :: Highlight -> [Highlight] # enumFromThen :: Highlight -> Highlight -> [Highlight] # enumFromTo :: Highlight -> Highlight -> [Highlight] # enumFromThenTo :: Highlight -> Highlight -> Highlight -> [Highlight] # | |
Eq Highlight Source # | |
Ord Highlight Source # | |
Defined in Game.LambdaHack.Definition.Color | |
Show Highlight Source # | |
Text attributes: foreground color and highlight.
highlightToColor :: Highlight -> Color Source #
Characters with attributes
newtype AttrCharW32 Source #
Optimized representation of AttrChar
.
Constructors
AttrCharW32 | |
Fields |
Instances
attrCharToW32 :: AttrChar -> AttrCharW32 Source #
fgFromW32 :: AttrCharW32 -> Color Source #
bgFromW32 :: AttrCharW32 -> Highlight Source #
charFromW32 :: AttrCharW32 -> Char Source #
attrFromW32 :: AttrCharW32 -> Attr Source #
attrChar2ToW32 :: Color -> Char -> AttrCharW32 Source #
attrChar1ToW32 :: Char -> AttrCharW32 Source #