module UVMHS.Lib.Pretty.Color where

import UVMHS.Core

data Color3Bit =
    DefaultColor
  | Black
  | Red
  | Green
  | Yellow
  | Blue
  | Magenta
  | Cyan
  | GrayLight
  | GrayDark
  | RedLight
  | GreenLight
  | YellowLight
  | BlueLight
  | PinkLight
  | TealLight
  | White
  deriving (Color3Bit -> Color3Bit -> Bool
(Color3Bit -> Color3Bit -> Bool)
-> (Color3Bit -> Color3Bit -> Bool) -> Eq Color3Bit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Color3Bit -> Color3Bit -> Bool
== :: Color3Bit -> Color3Bit -> Bool
$c/= :: Color3Bit -> Color3Bit -> Bool
/= :: Color3Bit -> Color3Bit -> Bool
Eq,Eq Color3Bit
Eq Color3Bit =>
(Color3Bit -> Color3Bit -> Ordering)
-> (Color3Bit -> Color3Bit -> Bool)
-> (Color3Bit -> Color3Bit -> Bool)
-> (Color3Bit -> Color3Bit -> Bool)
-> (Color3Bit -> Color3Bit -> Bool)
-> (Color3Bit -> Color3Bit -> Color3Bit)
-> (Color3Bit -> Color3Bit -> Color3Bit)
-> Ord Color3Bit
Color3Bit -> Color3Bit -> Bool
Color3Bit -> Color3Bit -> Ordering
Color3Bit -> Color3Bit -> Color3Bit
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 :: Color3Bit -> Color3Bit -> Ordering
compare :: Color3Bit -> Color3Bit -> Ordering
$c< :: Color3Bit -> Color3Bit -> Bool
< :: Color3Bit -> Color3Bit -> Bool
$c<= :: Color3Bit -> Color3Bit -> Bool
<= :: Color3Bit -> Color3Bit -> Bool
$c> :: Color3Bit -> Color3Bit -> Bool
> :: Color3Bit -> Color3Bit -> Bool
$c>= :: Color3Bit -> Color3Bit -> Bool
>= :: Color3Bit -> Color3Bit -> Bool
$cmax :: Color3Bit -> Color3Bit -> Color3Bit
max :: Color3Bit -> Color3Bit -> Color3Bit
$cmin :: Color3Bit -> Color3Bit -> Color3Bit
min :: Color3Bit -> Color3Bit -> Color3Bit
Ord,Int -> Color3Bit -> ShowS
[Color3Bit] -> ShowS
Color3Bit -> String
(Int -> Color3Bit -> ShowS)
-> (Color3Bit -> String)
-> ([Color3Bit] -> ShowS)
-> Show Color3Bit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Color3Bit -> ShowS
showsPrec :: Int -> Color3Bit -> ShowS
$cshow :: Color3Bit -> String
show :: Color3Bit -> String
$cshowList :: [Color3Bit] -> ShowS
showList :: [Color3Bit] -> ShowS
Show)
data Color = 
    Color Color3Bit
  | Color8 ℕ8
  | Color24 ℕ8 ℕ8 ℕ8
  deriving (Color -> Color -> Bool
(Color -> Color -> Bool) -> (Color -> Color -> Bool) -> Eq Color
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Color -> Color -> Bool
== :: Color -> Color -> Bool
$c/= :: Color -> Color -> Bool
/= :: Color -> Color -> Bool
Eq,Eq Color
Eq Color =>
(Color -> Color -> Ordering)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Bool)
-> (Color -> Color -> Color)
-> (Color -> Color -> Color)
-> Ord Color
Color -> Color -> Bool
Color -> Color -> Ordering
Color -> Color -> Color
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 :: Color -> Color -> Ordering
compare :: Color -> Color -> Ordering
$c< :: Color -> Color -> Bool
< :: Color -> Color -> Bool
$c<= :: Color -> Color -> Bool
<= :: Color -> Color -> Bool
$c> :: Color -> Color -> Bool
> :: Color -> Color -> Bool
$c>= :: Color -> Color -> Bool
>= :: Color -> Color -> Bool
$cmax :: Color -> Color -> Color
max :: Color -> Color -> Color
$cmin :: Color -> Color -> Color
min :: Color -> Color -> Color
Ord,Int -> Color -> ShowS
[Color] -> ShowS
Color -> String
(Int -> Color -> ShowS)
-> (Color -> String) -> ([Color] -> ShowS) -> Show Color
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Color -> ShowS
showsPrec :: Int -> Color -> ShowS
$cshow :: Color -> String
show :: Color -> String
$cshowList :: [Color] -> ShowS
showList :: [Color] -> ShowS
Show)

defaultColor  Color

black,red,green,yellow,blue,pink,teal,grayLight  Color
grayDark,redLight,greenLight,yellowLight,blueLight,pinkLight,tealLight,white  Color

highlight  Color

defaultColor :: Color
defaultColor = Color3Bit -> Color
Color Color3Bit
DefaultColor

black :: Color
black     = Color3Bit -> Color
Color Color3Bit
Black
red :: Color
red       = Color3Bit -> Color
Color Color3Bit
Red
green :: Color
green     = Color3Bit -> Color
Color Color3Bit
Green
yellow :: Color
yellow    = Color3Bit -> Color
Color Color3Bit
Yellow
blue :: Color
blue      = Color3Bit -> Color
Color Color3Bit
Blue
pink :: Color
pink      = Color3Bit -> Color
Color Color3Bit
Magenta
teal :: Color
teal      = Color3Bit -> Color
Color Color3Bit
Cyan
grayLight :: Color
grayLight = Color3Bit -> Color
Color Color3Bit
GrayLight

grayDark :: Color
grayDark     = Color3Bit -> Color
Color Color3Bit
GrayDark
redLight :: Color
redLight     = Color3Bit -> Color
Color Color3Bit
RedLight
greenLight :: Color
greenLight   = Color3Bit -> Color
Color Color3Bit
GreenLight
yellowLight :: Color
yellowLight  = Color3Bit -> Color
Color Color3Bit
YellowLight
blueLight :: Color
blueLight    = Color3Bit -> Color
Color Color3Bit
BlueLight
pinkLight :: Color
pinkLight    = Color3Bit -> Color
Color Color3Bit
PinkLight
tealLight :: Color
tealLight    = Color3Bit -> Color
Color Color3Bit
TealLight
white :: Color
white        = Color3Bit -> Color
Color Color3Bit
White

highlight :: Color
highlight = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 229

altBlack,altWhite  Color
altNight,altNightLight,altRed,altRedLight,altGreen,altGreenLight,altOrange,altOrangeLight  Color
altBlue,altBlueLight,altPurple,altPurpleLight,altTeal,altTealLight,altGray,altGrayLight  Color

-- colors borrowed from terminal.sexy
-- altBlack       = Color24 (𝕟8 0)   (𝕟8 0)   $ 𝕟8 0
-- altWhite       = Color24 (𝕟8 255) (𝕟8 255) $ 𝕟8 255
-- 
-- altNight       = Color24 (𝕟8 40)  (𝕟8 42)  $ 𝕟8 46
-- altNightLight  = Color24 (𝕟8 55)  (𝕟8 59)  $ 𝕟8 65
-- altRed         = Color24 (𝕟8 165) (𝕟8 66)  $ 𝕟8 66
-- altRedLight    = Color24 (𝕟8 204) (𝕟8 102) $ 𝕟8 102
-- altGreen       = Color24 (𝕟8 140) (𝕟8 148) $ 𝕟8 64
-- altGreenLight  = Color24 (𝕟8 181) (𝕟8 189) $ 𝕟8 104
-- altOrange      = Color24 (𝕟8 222) (𝕟8 147) $ 𝕟8 95
-- altOrangeLight = Color24 (𝕟8 240) (𝕟8 198) $ 𝕟8 116
-- 
-- altBlue        = Color24 (𝕟8 95)  (𝕟8 129) $ 𝕟8 157
-- altBlueLight   = Color24 (𝕟8 129) (𝕟8 162) $ 𝕟8 190
-- altPurple      = Color24 (𝕟8 133) (𝕟8 103) $ 𝕟8 143
-- altPurpleLight = Color24 (𝕟8 178) (𝕟8 148) $ 𝕟8 187
-- altTeal        = Color24 (𝕟8 94)  (𝕟8 141) $ 𝕟8 135
-- altTealLight   = Color24 (𝕟8 138) (𝕟8 190) $ 𝕟8 183
-- altGray        = Color24 (𝕟8 112) (𝕟8 120) $ 𝕟8 128
-- altGrayLight   = Color24 (𝕟8 197) (𝕟8 200) $ 𝕟8 198

altBlack :: Color
altBlack       = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 16
altWhite :: Color
altWhite       = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 231

altNight :: Color
altNight       = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 234
altNightLight :: Color
altNightLight  = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 241
altRed :: Color
altRed         = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 124
altRedLight :: Color
altRedLight    = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 202
altGreen :: Color
altGreen       = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 22
altGreenLight :: Color
altGreenLight  = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 40
altOrange :: Color
altOrange      = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 172
altOrangeLight :: Color
altOrangeLight = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 220

altBlue :: Color
altBlue        = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 33
altBlueLight :: Color
altBlueLight   = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 81
altPurple :: Color
altPurple      = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 97
altPurpleLight :: Color
altPurpleLight = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 145
altTeal :: Color
altTeal        = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 30
altTealLight :: Color
altTealLight   = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 108
altGray :: Color
altGray        = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 246
altGrayLight :: Color
altGrayLight   = ℕ8 -> Color
Color8 (ℕ8 -> Color) -> ℕ8 -> Color
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
𝕟8 253

allColors  𝐿 (𝕊  Color)
allColors :: 𝐿 (𝕊 ∧ Color)
allColors = [(𝕊, Color)] -> 𝐿 (𝕊 ∧ Color)
forall a b. CHS a b => b -> a
frhs
  [ (𝕊
"defaultColor"      ,Color
defaultColor  )
  , (𝕊
"black"             ,Color
black         )
  , (𝕊
"grayDark"          ,Color
grayDark      )
  , (𝕊
"grayLight"         ,Color
grayLight     )
  , (𝕊
"white"             ,Color
white         )
  , (𝕊
"red"               ,Color
red           )
  , (𝕊
"redLight"          ,Color
redLight      )
  , (𝕊
"green"             ,Color
green         )
  , (𝕊
"greenLight"        ,Color
greenLight    )
  , (𝕊
"yellow"            ,Color
yellow        )
  , (𝕊
"yellowLight"       ,Color
yellowLight   )
  , (𝕊
"blue"              ,Color
blue          )
  , (𝕊
"blueLight"         ,Color
blueLight     )
  , (𝕊
"pink"              ,Color
pink          )
  , (𝕊
"pinkLight"         ,Color
pinkLight     )
  , (𝕊
"teal"              ,Color
teal          )
  , (𝕊
"tealLight"         ,Color
tealLight     )
  , (𝕊
"highlight"         ,Color
highlight     )
  , (𝕊
"altBlack"          ,Color
altBlack      )
  , (𝕊
"altNight"          ,Color
altNight      )
  , (𝕊
"altNightLight"     ,Color
altNightLight )
  , (𝕊
"altGray"           ,Color
altGray       )
  , (𝕊
"altGrayLight"      ,Color
altGrayLight  )
  , (𝕊
"altWhite"          ,Color
altWhite      )
  , (𝕊
"altRed"            ,Color
altRed        )
  , (𝕊
"altRedLight"       ,Color
altRedLight   )
  , (𝕊
"altGreen"          ,Color
altGreen      )
  , (𝕊
"altGreenLight"     ,Color
altGreenLight )
  , (𝕊
"altOrange"         ,Color
altOrange     )
  , (𝕊
"altOrangeLight"    ,Color
altOrangeLight)
  , (𝕊
"altBlue"           ,Color
altBlue       )
  , (𝕊
"altBlueLight"      ,Color
altBlueLight  )
  , (𝕊
"altPurple"         ,Color
altPurple     )
  , (𝕊
"altPurpleLight"    ,Color
altPurpleLight)
  , (𝕊
"altTeal"           ,Color
altTeal       )
  , (𝕊
"altTealLight"      ,Color
altTealLight  )
  ]