graphviz-2999.20.1.0: Bindings to Graphviz for graph visualisation.

Copyright(c) Ivan Lazar Miljenovic
License3-Clause BSD-style
MaintainerIvan.Miljenovic@gmail.com
Safe HaskellNone
LanguageHaskell2010

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.

Constructors

X11 
SVG 
Brewer BrewerScheme 
Instances
Eq ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Attributes.ColorScheme

Ord ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Attributes.ColorScheme

Read ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Attributes.ColorScheme

Show ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Attributes.ColorScheme

ParseDot ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Parsing

PrintDot ColorScheme Source # 
Instance details

Defined in Data.GraphViz.Printing

Colors

data Color Source #

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

Constructors

RGB 

Fields

RGBA 

Fields

HSV

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

Fields

X11Color X11Color 
SVGColor SVGColor 
BrewerColor BrewerColor 

type ColorList = [WeightedColor] Source #

The sum of the optional weightings must sum to at most 1.

data WeightedColor Source #

A Color tagged with an optional weighting.

Constructors

WC 

Fields

Instances
Eq WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

Ord WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

Read WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

Show WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

ParseDot WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

PrintDot WeightedColor Source # 
Instance details

Defined in Data.GraphViz.Attributes.Colors

toWC :: Color -> WeightedColor Source #

For colors without weightings.

toColorList :: [Color] -> ColorList Source #

For a list of colors without weightings.

class NamedColor nc where Source #

More easily convert named colors to an overall Color value.

Minimal complete definition

colorScheme, toColor, printNC, parseNC'

Methods

toColor :: nc -> Color Source #

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 the RGB values of the Colors haven't been stored here (primarily for licensing reasons).

fromColour :: Colour Double -> Color Source #

Convert a Colour value to an RGB Color.

fromAColour :: AlphaColour Double -> Color Source #

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").