| Maintainer | Ivan.Miljenovic@gmail.com |
|---|---|
| Safe Haskell | Safe-Infered |
Data.GraphViz.Attributes.Colors
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
- data ColorScheme
- = X11
- | SVG
- | Brewer BrewerScheme
- data Color
- class NamedColor nc where
- toColour :: Color -> Maybe (AlphaColour Double)
- fromColour :: Colour Double -> Color
- fromAColour :: AlphaColour Double -> Color
Color schemes.
data ColorScheme Source
This represents the color schemes that Graphviz accepts.
Constructors
| X11 | |
| SVG | |
| Brewer BrewerScheme |
Colors
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 | |
| RGBA | |
| HSV | The |
| X11Color X11Color | |
| SVGColor SVGColor | |
| BrewerColor BrewerColor | |
class NamedColor nc whereSource
More easily convert named colors to an overall Color value.
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
BrewerColors haven't been stored here (primarily for licensing
reasons).
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 (note that the
TransparentShow instance for such an AlphaColour is "transparent").