summaryrefslogtreecommitdiffstats
path: root/app/Pretty/Color.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Pretty/Color.hs')
-rw-r--r--app/Pretty/Color.hs72
1 files changed, 37 insertions, 35 deletions
diff --git a/app/Pretty/Color.hs b/app/Pretty/Color.hs
index e8e48dd..7a55909 100644
--- a/app/Pretty/Color.hs
+++ b/app/Pretty/Color.hs
@@ -2,8 +2,9 @@
module Pretty.Color
( Color (..),
- toRgb,
Intensity (..),
+ toXColor,
+ XColor (..),
)
where
@@ -18,41 +19,42 @@ data Color
| White
deriving (Show, Eq, Ord)
-toRgb :: (Intensity, Color) -> String
-toRgb (Dull, Black) = base00 -- color0
-toRgb (Dull, Red) = base08 -- color1
-toRgb (Dull, Green) = base0B -- color2
-toRgb (Dull, Yellow) = base0A -- color3
-toRgb (Dull, Blue) = base0D -- color4
-toRgb (Dull, Magenta) = base0E -- color5
-toRgb (Dull, Cyan) = base0C -- color6
-toRgb (Dull, White) = base05 -- color7
-toRgb (Vivid, Black) = base03 -- color8
-toRgb (Vivid, Red) = base08 -- color9
-toRgb (Vivid, Green) = base0B -- color10
-toRgb (Vivid, Yellow) = base0A -- color11
-toRgb (Vivid, Blue) = base0D -- color12
-toRgb (Vivid, Magenta) = base0E -- color13
-toRgb (Vivid, Cyan) = base0C -- color14
-toRgb (Vivid, White) = base07 -- color15
+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)
-base00, base01, base02, base03, base04, base05, base06, base07, base08, base09, base0A, base0B, base0C, base0D, base0E, base0F :: String
-base00 = "#263238"
-base01 = "#2E3C43"
-base02 = "#314549"
-base03 = "#546E7A"
-base04 = "#B2CCD6"
-base05 = "#EEFFFF"
-base06 = "#EEFFFF"
-base07 = "#FFFFFF"
-base08 = "#F07178"
-base09 = "#F78C6C"
-base0A = "#FFCB6B"
-base0B = "#C3E88D"
-base0C = "#89DDFF"
-base0D = "#82AAFF"
-base0E = "#C792EA"
-base0F = "#FF5370"
+data XColor
+ = Color0
+ | Color1
+ | Color2
+ | Color3
+ | Color4
+ | Color5
+ | Color6
+ | Color7
+ | Color8
+ | Color9
+ | Color10
+ | Color11
+ | Color12
+ | Color13
+ | Color14
+ | Color15
+ deriving (Eq, Ord, Enum)