    {-# OPTIONS_HADDOCK hide #-}

    {- |
       Module      : Data.GraphViz.Attributes.ColorScheme
       Description : Specification of color schemes.
       Copyright   : (c) Ivan Lazar Miljenovic
       License     : 3-Clause BSD-style
       Maintainer  : Ivan.Miljenovic@gmail.com

       This is an internal module designed so that the state can record
       the current color scheme.
    -}
    module Data.GraphViz.Attributes.ColorScheme where

    import Data.Word(Word8)

    -- -----------------------------------------------------------------------------

    -- | This represents the color schemes that Graphviz accepts.
    data ColorScheme = X11
                     | SVG
                     | Brewer BrewerScheme
                     deriving (ColorScheme -> ColorScheme -> Bool
    (ColorScheme -> ColorScheme -> Bool)
    -> (ColorScheme -> ColorScheme -> Bool) -> Eq ColorScheme
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ColorScheme -> ColorScheme -> Bool
    == :: ColorScheme -> ColorScheme -> Bool
    $c/= :: ColorScheme -> ColorScheme -> Bool
    /= :: ColorScheme -> ColorScheme -> Bool
    Eq, Eq ColorScheme
    Eq ColorScheme =>
    (ColorScheme -> ColorScheme -> Ordering)
    -> (ColorScheme -> ColorScheme -> Bool)
    -> (ColorScheme -> ColorScheme -> Bool)
    -> (ColorScheme -> ColorScheme -> Bool)
    -> (ColorScheme -> ColorScheme -> Bool)
    -> (ColorScheme -> ColorScheme -> ColorScheme)
    -> (ColorScheme -> ColorScheme -> ColorScheme)
    -> Ord ColorScheme
    ColorScheme -> ColorScheme -> Bool
    ColorScheme -> ColorScheme -> Ordering
    ColorScheme -> ColorScheme -> ColorScheme
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: ColorScheme -> ColorScheme -> Ordering
    compare :: ColorScheme -> ColorScheme -> Ordering
    $c< :: ColorScheme -> ColorScheme -> Bool
    < :: ColorScheme -> ColorScheme -> Bool
    $c<= :: ColorScheme -> ColorScheme -> Bool
    <= :: ColorScheme -> ColorScheme -> Bool
    $c> :: ColorScheme -> ColorScheme -> Bool
    > :: ColorScheme -> ColorScheme -> Bool
    $c>= :: ColorScheme -> ColorScheme -> Bool
    >= :: ColorScheme -> ColorScheme -> Bool
    $cmax :: ColorScheme -> ColorScheme -> ColorScheme
    max :: ColorScheme -> ColorScheme -> ColorScheme
    $cmin :: ColorScheme -> ColorScheme -> ColorScheme
    min :: ColorScheme -> ColorScheme -> ColorScheme
    Ord, Int -> ColorScheme -> ShowS
    [ColorScheme] -> ShowS
    ColorScheme -> String
    (Int -> ColorScheme -> ShowS)
    -> (ColorScheme -> String)
    -> ([ColorScheme] -> ShowS)
    -> Show ColorScheme
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ColorScheme -> ShowS
    showsPrec :: Int -> ColorScheme -> ShowS
    $cshow :: ColorScheme -> String
    show :: ColorScheme -> String
    $cshowList :: [ColorScheme] -> ShowS
    showList :: [ColorScheme] -> ShowS
    Show, ReadPrec [ColorScheme]
    ReadPrec ColorScheme
    Int -> ReadS ColorScheme
    ReadS [ColorScheme]
    (Int -> ReadS ColorScheme)
    -> ReadS [ColorScheme]
    -> ReadPrec ColorScheme
    -> ReadPrec [ColorScheme]
    -> Read ColorScheme
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS ColorScheme
    readsPrec :: Int -> ReadS ColorScheme
    $creadList :: ReadS [ColorScheme]
    readList :: ReadS [ColorScheme]
    $creadPrec :: ReadPrec ColorScheme
    readPrec :: ReadPrec ColorScheme
    $creadListPrec :: ReadPrec [ColorScheme]
    readListPrec :: ReadPrec [ColorScheme]
    Read)

    -- | Specify which colour palette and how many colours it has.  Note
    --   the allowed values for the different 'BrewerName's.
    data BrewerScheme = BScheme BrewerName Word8
                      deriving (BrewerScheme -> BrewerScheme -> Bool
    (BrewerScheme -> BrewerScheme -> Bool)
    -> (BrewerScheme -> BrewerScheme -> Bool) -> Eq BrewerScheme
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BrewerScheme -> BrewerScheme -> Bool
    == :: BrewerScheme -> BrewerScheme -> Bool
    $c/= :: BrewerScheme -> BrewerScheme -> Bool
    /= :: BrewerScheme -> BrewerScheme -> Bool
    Eq, Eq BrewerScheme
    Eq BrewerScheme =>
    (BrewerScheme -> BrewerScheme -> Ordering)
    -> (BrewerScheme -> BrewerScheme -> Bool)
    -> (BrewerScheme -> BrewerScheme -> Bool)
    -> (BrewerScheme -> BrewerScheme -> Bool)
    -> (BrewerScheme -> BrewerScheme -> Bool)
    -> (BrewerScheme -> BrewerScheme -> BrewerScheme)
    -> (BrewerScheme -> BrewerScheme -> BrewerScheme)
    -> Ord BrewerScheme
    BrewerScheme -> BrewerScheme -> Bool
    BrewerScheme -> BrewerScheme -> Ordering
    BrewerScheme -> BrewerScheme -> BrewerScheme
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: BrewerScheme -> BrewerScheme -> Ordering
    compare :: BrewerScheme -> BrewerScheme -> Ordering
    $c< :: BrewerScheme -> BrewerScheme -> Bool
    < :: BrewerScheme -> BrewerScheme -> Bool
    $c<= :: BrewerScheme -> BrewerScheme -> Bool
    <= :: BrewerScheme -> BrewerScheme -> Bool
    $c> :: BrewerScheme -> BrewerScheme -> Bool
    > :: BrewerScheme -> BrewerScheme -> Bool
    $c>= :: BrewerScheme -> BrewerScheme -> Bool
    >= :: BrewerScheme -> BrewerScheme -> Bool
    $cmax :: BrewerScheme -> BrewerScheme -> BrewerScheme
    max :: BrewerScheme -> BrewerScheme -> BrewerScheme
    $cmin :: BrewerScheme -> BrewerScheme -> BrewerScheme
    min :: BrewerScheme -> BrewerScheme -> BrewerScheme
    Ord, Int -> BrewerScheme -> ShowS
    [BrewerScheme] -> ShowS
    BrewerScheme -> String
    (Int -> BrewerScheme -> ShowS)
    -> (BrewerScheme -> String)
    -> ([BrewerScheme] -> ShowS)
    -> Show BrewerScheme
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> BrewerScheme -> ShowS
    showsPrec :: Int -> BrewerScheme -> ShowS
    $cshow :: BrewerScheme -> String
    show :: BrewerScheme -> String
    $cshowList :: [BrewerScheme] -> ShowS
    showList :: [BrewerScheme] -> ShowS
    Show, ReadPrec [BrewerScheme]
    ReadPrec BrewerScheme
    Int -> ReadS BrewerScheme
    ReadS [BrewerScheme]
    (Int -> ReadS BrewerScheme)
    -> ReadS [BrewerScheme]
    -> ReadPrec BrewerScheme
    -> ReadPrec [BrewerScheme]
    -> Read BrewerScheme
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS BrewerScheme
    readsPrec :: Int -> ReadS BrewerScheme
    $creadList :: ReadS [BrewerScheme]
    readList :: ReadS [BrewerScheme]
    $creadPrec :: ReadPrec BrewerScheme
    readPrec :: ReadPrec BrewerScheme
    $creadListPrec :: ReadPrec [BrewerScheme]
    readListPrec :: ReadPrec [BrewerScheme]
    Read)

    -- | All of these have a minimum level value of @3@, with a maximum
    --   of @9@ unless otherwise specified.
    data BrewerName = 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
                    deriving (BrewerName -> BrewerName -> Bool
    (BrewerName -> BrewerName -> Bool)
    -> (BrewerName -> BrewerName -> Bool) -> Eq BrewerName
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BrewerName -> BrewerName -> Bool
    == :: BrewerName -> BrewerName -> Bool
    $c/= :: BrewerName -> BrewerName -> Bool
    /= :: BrewerName -> BrewerName -> Bool
    Eq, Eq BrewerName
    Eq BrewerName =>
    (BrewerName -> BrewerName -> Ordering)
    -> (BrewerName -> BrewerName -> Bool)
    -> (BrewerName -> BrewerName -> Bool)
    -> (BrewerName -> BrewerName -> Bool)
    -> (BrewerName -> BrewerName -> Bool)
    -> (BrewerName -> BrewerName -> BrewerName)
    -> (BrewerName -> BrewerName -> BrewerName)
    -> Ord BrewerName
    BrewerName -> BrewerName -> Bool
    BrewerName -> BrewerName -> Ordering
    BrewerName -> BrewerName -> BrewerName
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: BrewerName -> BrewerName -> Ordering
    compare :: BrewerName -> BrewerName -> Ordering
    $c< :: BrewerName -> BrewerName -> Bool
    < :: BrewerName -> BrewerName -> Bool
    $c<= :: BrewerName -> BrewerName -> Bool
    <= :: BrewerName -> BrewerName -> Bool
    $c> :: BrewerName -> BrewerName -> Bool
    > :: BrewerName -> BrewerName -> Bool
    $c>= :: BrewerName -> BrewerName -> Bool
    >= :: BrewerName -> BrewerName -> Bool
    $cmax :: BrewerName -> BrewerName -> BrewerName
    max :: BrewerName -> BrewerName -> BrewerName
    $cmin :: BrewerName -> BrewerName -> BrewerName
    min :: BrewerName -> BrewerName -> BrewerName
    Ord, BrewerName
    BrewerName -> BrewerName -> Bounded BrewerName
    forall a. a -> a -> Bounded a
    $cminBound :: BrewerName
    minBound :: BrewerName
    $cmaxBound :: BrewerName
    maxBound :: BrewerName
    Bounded, Int -> BrewerName
    BrewerName -> Int
    BrewerName -> [BrewerName]
    BrewerName -> BrewerName
    BrewerName -> BrewerName -> [BrewerName]
    BrewerName -> BrewerName -> BrewerName -> [BrewerName]
    (BrewerName -> BrewerName)
    -> (BrewerName -> BrewerName)
    -> (Int -> BrewerName)
    -> (BrewerName -> Int)
    -> (BrewerName -> [BrewerName])
    -> (BrewerName -> BrewerName -> [BrewerName])
    -> (BrewerName -> BrewerName -> [BrewerName])
    -> (BrewerName -> BrewerName -> BrewerName -> [BrewerName])
    -> Enum BrewerName
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: BrewerName -> BrewerName
    succ :: BrewerName -> BrewerName
    $cpred :: BrewerName -> BrewerName
    pred :: BrewerName -> BrewerName
    $ctoEnum :: Int -> BrewerName
    toEnum :: Int -> BrewerName
    $cfromEnum :: BrewerName -> Int
    fromEnum :: BrewerName -> Int
    $cenumFrom :: BrewerName -> [BrewerName]
    enumFrom :: BrewerName -> [BrewerName]
    $cenumFromThen :: BrewerName -> BrewerName -> [BrewerName]
    enumFromThen :: BrewerName -> BrewerName -> [BrewerName]
    $cenumFromTo :: BrewerName -> BrewerName -> [BrewerName]
    enumFromTo :: BrewerName -> BrewerName -> [BrewerName]
    $cenumFromThenTo :: BrewerName -> BrewerName -> BrewerName -> [BrewerName]
    enumFromThenTo :: BrewerName -> BrewerName -> BrewerName -> [BrewerName]
    Enum, Int -> BrewerName -> ShowS
    [BrewerName] -> ShowS
    BrewerName -> String
    (Int -> BrewerName -> ShowS)
    -> (BrewerName -> String)
    -> ([BrewerName] -> ShowS)
    -> Show BrewerName
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> BrewerName -> ShowS
    showsPrec :: Int -> BrewerName -> ShowS
    $cshow :: BrewerName -> String
    show :: BrewerName -> String
    $cshowList :: [BrewerName] -> ShowS
    showList :: [BrewerName] -> ShowS
    Show, ReadPrec [BrewerName]
    ReadPrec BrewerName
    Int -> ReadS BrewerName
    ReadS [BrewerName]
    (Int -> ReadS BrewerName)
    -> ReadS [BrewerName]
    -> ReadPrec BrewerName
    -> ReadPrec [BrewerName]
    -> Read BrewerName
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS BrewerName
    readsPrec :: Int -> ReadS BrewerName
    $creadList :: ReadS [BrewerName]
    readList :: ReadS [BrewerName]
    $creadPrec :: ReadPrec BrewerName
    readPrec :: ReadPrec BrewerName
    $creadListPrec :: ReadPrec [BrewerName]
    readListPrec :: ReadPrec [BrewerName]
    Read)