LambdaHack-0.8.3.0: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Color

Contents

Description

Colours and text attributes.

Synopsis

Colours

data Color Source #

Colours supported by the major frontends.

Instances
Bounded Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Enum Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Eq Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Methods

(==) :: Color -> Color -> Bool Source #

(/=) :: Color -> Color -> Bool Source #

Ord Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Show Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Generic Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Associated Types

type Rep Color :: Type -> Type Source #

Methods

from :: Color -> Rep Color x Source #

to :: Rep Color x -> Color Source #

Binary Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

NFData Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Methods

rnf :: Color -> () Source #

Hashable Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

type Rep Color Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

type Rep Color = D1 (MetaData "Color" "Game.LambdaHack.Common.Color" "LambdaHack-0.8.3.0-Ezh08XnEAZCGads34ZqXQD" 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 "Brown" 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)))) :+: (((C1 (MetaCons "BrBlack" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BrRed" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "BrGreen" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BrYellow" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "BrBlue" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BrMagenta" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "BrCyan" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BrWhite" PrefixI False) (U1 :: Type -> Type)))))

defFG :: Color Source #

The default colours, to optimize attribute setting.

isBright :: Color -> Bool Source #

A helper for the terminal frontends that display bright via bold.

darkCol :: [Color] Source #

Colour sets.

brightCol :: [Color] Source #

Colour sets.

stdCol :: [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

data Highlight Source #

Additional map cell highlight, e.g., a colorful square around the cell or a colorful background.

Instances
Bounded Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Enum Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Eq Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Ord Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Show Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Generic Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Associated Types

type Rep Highlight :: Type -> Type Source #

type Rep Highlight Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

type Rep Highlight = D1 (MetaData "Highlight" "Game.LambdaHack.Common.Color" "LambdaHack-0.8.3.0-Ezh08XnEAZCGads34ZqXQD" False) ((C1 (MetaCons "HighlightNone" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "HighlightRed" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "HighlightBlue" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "HighlightYellow" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "HighlightGrey" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "HighlightWhite" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "HighlightMagenta" PrefixI False) (U1 :: Type -> Type))))

data Attr Source #

Text attributes: foreground color and highlight.

Constructors

Attr 

Fields

Instances
Enum Attr Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Eq Attr Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Methods

(==) :: Attr -> Attr -> Bool Source #

(/=) :: Attr -> Attr -> Bool Source #

Ord Attr Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Show Attr Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

defAttr :: Attr Source #

The default attribute, to optimize attribute setting.

Characters with attributes

data AttrChar Source #

Character to display, with its attribute.

Constructors

AttrChar 

Fields

newtype AttrCharW32 Source #

Optimized representation of AttrChar.

Constructors

AttrCharW32 

Fields

Instances
Enum AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Eq AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Ord AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Show AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Binary AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

UnboxRepClass AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color

Associated Types

type UnboxRep AttrCharW32 :: Type Source #

type UnboxRep AttrCharW32 Source # 
Instance details

Defined in Game.LambdaHack.Common.Color