LambdaHack-0.2.10: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Common.Color

Contents

Description

Colours and text attributes.

Synopsis

Colours

data Color

Colours supported by the major frontends.

Instances

defBG :: Color

The default colours, to optimize attribute setting.

defFG :: Color

The default colours, to optimize attribute setting.

isBright :: Color -> Bool

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

legalBG :: [Color]

Due to the limitation of the curses library used in the curses frontend, only these are legal backgrounds.

darkCol :: [Color]

Colour sets.

brightCol :: [Color]

Colour sets.

stdCol :: [Color]

Colour sets.

colorToRGB :: Color -> String

Translationg to heavily modified Linux console color RGB values.

Text attributes and the screen

data Attr

Text attributes: foreground and backgroud colors.

Constructors

Attr 

Fields

fg :: !Color

foreground colour

bg :: !Color

backgroud color

Instances

Eq Attr 
Ord Attr 
Show Attr 
Binary Attr 

defAttr :: Attr

The default attribute, to optimize attribute setting.

data AttrChar

Constructors

AttrChar 

Fields

acAttr :: !Attr
 
acChar :: !Char
 

Instances