{-# OPTIONS_GHC -fno-warn-unused-top-binds #-} module Pretty.Color ( Color (..), Intensity (..), toXColor, XColor (..), ) where data Color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Show, Eq, Ord) toXColor :: (Intensity, Color) -> XColor toXColor (Dull, Black) = Color0 toXColor (Dull, Red) = Color1 toXColor (Dull, Green) = Color2 toXColor (Dull, Yellow) = Color3 toXColor (Dull, Blue) = Color4 toXColor (Dull, Magenta) = Color5 toXColor (Dull, Cyan) = Color6 toXColor (Dull, White) = Color7 toXColor (Vivid, Black) = Color8 toXColor (Vivid, Red) = Color9 toXColor (Vivid, Green) = Color10 toXColor (Vivid, Yellow) = Color11 toXColor (Vivid, Blue) = Color12 toXColor (Vivid, Magenta) = Color13 toXColor (Vivid, Cyan) = Color14 toXColor (Vivid, White) = Color15 data Intensity = Vivid | Dull deriving (Show, Eq, Ord) data XColor = Color0 | Color1 | Color2 | Color3 | Color4 | Color5 | Color6 | Color7 | Color8 | Color9 | Color10 | Color11 | Color12 | Color13 | Color14 | Color15 deriving (Eq, Ord, Enum)