wumpus-core-0.35.0: Pure Haskell PostScript and SVG generation.

PortabilityGHC
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Wumpus.Core.Colour

Contents

Description

Colour represented as RGB with each component in the range [0..255].

Note - the predefined colours are hidden when importing the top-level shim module Wumpus.Core, import Wumpus.Core.Colour directly to use them.

PostScript has no support for RGB-alpha and hence does not transparency. Thus Wumpus in turn cannot support transparency.

Synopsis

RGB colour type

data RGBi Source

Colours levels are in the range [0..255]

Note - this is the format used by SVG, whereas PostScript uses [0..1].

It is more efficient to prefer SVG here.

Constructors

RGBi !Word8 !Word8 !Word8 

Instances

Eq RGBi 
Ord RGBi 
Show RGBi 
Format RGBi 

Predefined colours

black :: RGBiSource

Black - 0, 0, 0.

white :: RGBiSource

White - 255, 255, 255.

red :: RGBiSource

Red - 255, 0, 0.

green :: RGBiSource

Green - 0, 255, 0.

blue :: RGBiSource

Blue - 0, 0, 255.

yellow :: RGBiSource

Yellow - 255, 255, 0.

cyan :: RGBiSource

Cyan - 0, 255, 255.

magenta :: RGBiSource

Magenta - 255, 0, 255.