graphviz-2999.12.0.1: Bindings to Graphviz for graph visualisation.

MaintainerIvan.Miljenovic@gmail.com

Data.GraphViz.Attributes.Colors

Contents

Description

This module defines the various colors, etc. for Graphviz. For information on colors in general, see: http://graphviz.org/doc/info/attrs.html#k:color For named colors, see: http://graphviz.org/doc/info/colors.html

Note that the ColorBrewer Color Schemes (shortened to just "Brewer" for the rest of this module) are covered by the following license (also available in the LICENSE file of this library): http://graphviz.org/doc/info/colors.html#brewer_license

Synopsis

Color schemes.

data ColorScheme Source

This represents the color schemes that Graphviz accepts. As mentioned above, these are not used for actual parsing or printing.

Constructors

X11 
Brewer BrewerScheme 

data BrewerName Source

All of these have a minimum level value of 3, with a maximum of 9 unless otherwise specified.

Constructors

Accent

Maximum of 8.

Blues 
Brbg

Maximum of 11.

Bugn 
Bupu 
Dark2

Maximum of 8.

Gnbu 
Greens 
Greys 
Oranges 
Orrd 
Paired

Maximum of 12.

Pastel1 
Pastel2

Maximum of 8.

Piyg

Maximum of 11.

Prgn

Maximum of 11.

Pubu 
Pubugn 
Puor

Maximum of 11; note that the last two are listed after the Purd values in the documentation.

Purd 
Purples 
Rdbu

Maximum of 11; note that the last two are listed first.

Rdgy

Maximum of 11; note that the last two are listed after the Rdpu values in the documentation.

Rdpu 
Rdylbu

Maximum of 11.

Rdylgn

Maximum of 11.

Reds 
Set1 
Set2

Maximum of 8.

Set3

Maximum of 12.

Spectral

Maximum of 11.

Ylgn 
Ylgnbu 
Ylorbr 
Ylorrd 

Colors

data Color Source

Defining a color for use with Graphviz. Note that named colors have been split up into X11Colors and those based upon the Brewer color schemes.

Constructors

RGB 

Fields

red :: Word8
 
green :: Word8
 
blue :: Word8
 
RGBA 

Fields

red :: Word8
 
green :: Word8
 
blue :: Word8
 
alpha :: Word8
 
HSV

The hue, saturation and value values must all be 0 <= x <=1.

Fields

hue :: Double
 
saturation :: Double
 
value :: Double
 
X11Color X11Color 
BrewerColor BrewerScheme Word8

This value should be between 1 and the level of the BrewerScheme being used.

data X11Color Source

The X11 colors that Graphviz uses. Note that these are slightly different from the "normal" X11 colors used (e.g. the inclusion of Crimson). Graphviz's list of colors also duplicated almost all Gray colors with Grey ones; parsing of an X11Color which is specified using "grey" will succeed, even for those that don't have the duplicate spelling (e.g. DarkSlateGray1).

Constructors

AliceBlue 
AntiqueWhite 
AntiqueWhite1 
AntiqueWhite2 
AntiqueWhite3 
AntiqueWhite4 
Aquamarine 
Aquamarine1 
Aquamarine2 
Aquamarine3 
Aquamarine4 
Azure 
Azure1 
Azure2 
Azure3 
Azure4 
Beige 
Bisque 
Bisque1 
Bisque2 
Bisque3 
Bisque4 
Black 
BlanchedAlmond 
Blue 
Blue1 
Blue2 
Blue3 
Blue4 
BlueViolet 
Brown 
Brown1 
Brown2 
Brown3 
Brown4 
Burlywood 
Burlywood1 
Burlywood2 
Burlywood3 
Burlywood4 
CadetBlue 
CadetBlue1 
CadetBlue2 
CadetBlue3 
CadetBlue4 
Chartreuse 
Chartreuse1 
Chartreuse2 
Chartreuse3 
Chartreuse4 
Chocolate 
Chocolate1 
Chocolate2 
Chocolate3 
Chocolate4 
Coral 
Coral1 
Coral2 
Coral3 
Coral4 
CornFlowerBlue 
CornSilk 
CornSilk1 
CornSilk2 
CornSilk3 
CornSilk4 
Crimson 
Cyan 
Cyan1 
Cyan2 
Cyan3 
Cyan4 
DarkGoldenrod 
DarkGoldenrod1 
DarkGoldenrod2 
DarkGoldenrod3 
DarkGoldenrod4 
DarkGreen 
Darkkhaki 
DarkOliveGreen 
DarkOliveGreen1 
DarkOliveGreen2 
DarkOliveGreen3 
DarkOliveGreen4 
DarkOrange 
DarkOrange1 
DarkOrange2 
DarkOrange3 
DarkOrange4 
DarkOrchid 
DarkOrchid1 
DarkOrchid2 
DarkOrchid3 
DarkOrchid4 
DarkSalmon 
DarkSeaGreen 
DarkSeaGreen1 
DarkSeaGreen2 
DarkSeaGreen3 
DarkSeaGreen4 
DarkSlateBlue 
DarkSlateGray 
DarkSlateGray1 
DarkSlateGray2 
DarkSlateGray3 
DarkSlateGray4 
DarkTurquoise 
DarkViolet 
DeepPink 
DeepPink1 
DeepPink2 
DeepPink3 
DeepPink4 
DeepSkyBlue 
DeepSkyBlue1 
DeepSkyBlue2 
DeepSkyBlue3 
DeepSkyBlue4 
DimGray 
DodgerBlue 
DodgerBlue1 
DodgerBlue2 
DodgerBlue3 
DodgerBlue4 
Firebrick 
Firebrick1 
Firebrick2 
Firebrick3 
Firebrick4 
FloralWhite 
ForestGreen 
Gainsboro 
GhostWhite 
Gold 
Gold1 
Gold2 
Gold3 
Gold4 
Goldenrod 
Goldenrod1 
Goldenrod2 
Goldenrod3 
Goldenrod4 
Gray 
Gray0 
Gray1 
Gray2 
Gray3 
Gray4 
Gray5 
Gray6 
Gray7 
Gray8 
Gray9 
Gray10 
Gray11 
Gray12 
Gray13 
Gray14 
Gray15 
Gray16 
Gray17 
Gray18 
Gray19 
Gray20 
Gray21 
Gray22 
Gray23 
Gray24 
Gray25 
Gray26 
Gray27 
Gray28 
Gray29 
Gray30 
Gray31 
Gray32 
Gray33 
Gray34 
Gray35 
Gray36 
Gray37 
Gray38 
Gray39 
Gray40 
Gray41 
Gray42 
Gray43 
Gray44 
Gray45 
Gray46 
Gray47 
Gray48 
Gray49 
Gray50 
Gray51 
Gray52 
Gray53 
Gray54 
Gray55 
Gray56 
Gray57 
Gray58 
Gray59 
Gray60 
Gray61 
Gray62 
Gray63 
Gray64 
Gray65 
Gray66 
Gray67 
Gray68 
Gray69 
Gray70 
Gray71 
Gray72 
Gray73 
Gray74 
Gray75 
Gray76 
Gray77 
Gray78 
Gray79 
Gray80 
Gray81 
Gray82 
Gray83 
Gray84 
Gray85 
Gray86 
Gray87 
Gray88 
Gray89 
Gray90 
Gray91 
Gray92 
Gray93 
Gray94 
Gray95 
Gray96 
Gray97 
Gray98 
Gray99 
Gray100 
Green 
Green1 
Green2 
Green3 
Green4 
GreenYellow 
HoneyDew 
HoneyDew1 
HoneyDew2 
HoneyDew3 
HoneyDew4 
HotPink 
HotPink1 
HotPink2 
HotPink3 
HotPink4 
IndianRed 
IndianRed1 
IndianRed2 
IndianRed3 
IndianRed4 
Indigo 
Ivory 
Ivory1 
Ivory2 
Ivory3 
Ivory4 
Khaki 
Khaki1 
Khaki2 
Khaki3 
Khaki4 
Lavender 
LavenderBlush 
LavenderBlush1 
LavenderBlush2 
LavenderBlush3 
LavenderBlush4 
LawnGreen 
LemonChiffon 
LemonChiffon1 
LemonChiffon2 
LemonChiffon3 
LemonChiffon4 
LightBlue 
LightBlue1 
LightBlue2 
LightBlue3 
LightBlue4 
LightCoral 
LightCyan 
LightCyan1 
LightCyan2 
LightCyan3 
LightCyan4 
LightGoldenrod 
LightGoldenrod1 
LightGoldenrod2 
LightGoldenrod3 
LightGoldenrod4 
LightGoldenrodYellow 
LightGray 
LightPink 
LightPink1 
LightPink2 
LightPink3 
LightPink4 
LightSalmon 
LightSalmon1 
LightSalmon2 
LightSalmon3 
LightSalmon4 
LightSeaGreen 
LightSkyBlue 
LightSkyBlue1 
LightSkyBlue2 
LightSkyBlue3 
LightSkyBlue4 
LightSlateBlue 
LightSlateGray 
LightSteelBlue 
LightSteelBlue1 
LightSteelBlue2 
LightSteelBlue3 
LightSteelBlue4 
LightYellow 
LightYellow1 
LightYellow2 
LightYellow3 
LightYellow4 
LimeGreen 
Linen 
Magenta 
Magenta1 
Magenta2 
Magenta3 
Magenta4 
Maroon 
Maroon1 
Maroon2 
Maroon3 
Maroon4 
MediumAquamarine 
MediumBlue 
MediumOrchid 
MediumOrchid1 
MediumOrchid2 
MediumOrchid3 
MediumOrchid4 
MediumPurple 
MediumPurple1 
MediumPurple2 
MediumPurple3 
MediumPurple4 
MediumSeaGreen 
MediumSlateBlue 
MediumSpringGreen 
MediumTurquoise 
MediumVioletRed 
MidnightBlue 
MintCream 
MistyRose 
MistyRose1 
MistyRose2 
MistyRose3 
MistyRose4 
Moccasin 
NavajoWhite 
NavajoWhite1 
NavajoWhite2 
NavajoWhite3 
NavajoWhite4 
Navy 
NavyBlue 
OldLace 
OliveDrab 
OliveDrab1 
OliveDrab2 
OliveDrab3 
OliveDrab4 
Orange 
Orange1 
Orange2 
Orange3 
Orange4 
OrangeRed 
OrangeRed1 
OrangeRed2 
OrangeRed3 
OrangeRed4 
Orchid 
Orchid1 
Orchid2 
Orchid3 
Orchid4 
PaleGoldenrod 
PaleGreen 
PaleGreen1 
PaleGreen2 
PaleGreen3 
PaleGreen4 
PaleTurquoise 
PaleTurquoise1 
PaleTurquoise2 
PaleTurquoise3 
PaleTurquoise4 
PaleVioletRed 
PaleVioletRed1 
PaleVioletRed2 
PaleVioletRed3 
PaleVioletRed4 
PapayaWhip 
PeachPuff 
PeachPuff1 
PeachPuff2 
PeachPuff3 
PeachPuff4 
Peru 
Pink 
Pink1 
Pink2 
Pink3 
Pink4 
Plum 
Plum1 
Plum2 
Plum3 
Plum4 
PowderBlue 
Purple 
Purple1 
Purple2 
Purple3 
Purple4 
Red 
Red1 
Red2 
Red3 
Red4 
RosyBrown 
RosyBrown1 
RosyBrown2 
RosyBrown3 
RosyBrown4 
RoyalBlue 
RoyalBlue1 
RoyalBlue2 
RoyalBlue3 
RoyalBlue4 
SaddleBrown 
Salmon 
Salmon1 
Salmon2 
Salmon3 
Salmon4 
SandyBrown 
SeaGreen 
SeaGreen1 
SeaGreen2 
SeaGreen3 
SeaGreen4 
SeaShell 
SeaShell1 
SeaShell2 
SeaShell3 
SeaShell4 
Sienna 
Sienna1 
Sienna2 
Sienna3 
Sienna4 
SkyBlue 
SkyBlue1 
SkyBlue2 
SkyBlue3 
SkyBlue4 
SlateBlue 
SlateBlue1 
SlateBlue2 
SlateBlue3 
SlateBlue4 
SlateGray 
SlateGray1 
SlateGray2 
SlateGray3 
SlateGray4 
Snow 
Snow1 
Snow2 
Snow3 
Snow4 
SpringGreen 
SpringGreen1 
SpringGreen2 
SpringGreen3 
SpringGreen4 
SteelBlue 
SteelBlue1 
SteelBlue2 
SteelBlue3 
SteelBlue4 
Tan 
Tan1 
Tan2 
Tan3 
Tan4 
Thistle 
Thistle1 
Thistle2 
Thistle3 
Thistle4 
Tomato 
Tomato1 
Tomato2 
Tomato3 
Tomato4 
Transparent

Equivalent to setting Style [SItem Invisible []].

Turquoise 
Turquoise1 
Turquoise2 
Turquoise3 
Turquoise4 
Violet 
VioletRed 
VioletRed1 
VioletRed2 
VioletRed3 
VioletRed4 
Wheat 
Wheat1 
Wheat2 
Wheat3 
Wheat4 
White 
WhiteSmoke 
Yellow 
Yellow1 
Yellow2 
Yellow3 
Yellow4 
YellowGreen 

Conversion to/from Colour.

toColour :: Color -> Maybe (AlphaColour Double)Source

Attempt to convert a Color into a Colour value with an alpha channel. The use of Maybe is because BrewerColor values cannot be converted without knowing which actual BrewerName and level color scheme is being used.

x11Colour :: X11Color -> AlphaColour DoubleSource

Convert an X11Color to its equivalent Colour value. Note that it uses AlphaColour because of Transparent; all other X11Color values are completely opaque.

fromColour :: Colour Double -> ColorSource

Convert a Colour value to an RGB Color.

fromAColour :: AlphaColour Double -> ColorSource

Convert an AlphaColour to an RGBA Color. The exception to this is for any AlphaColour which has alphaChannel ac == 0; these are converted to X11Color Transparent (note that the Show instance for such an AlphaColour is "transparent").