@@ -1,4 +1,23 @@
1−module Graphics.Vty.Attributes.Color where
1+module Graphics.Vty.Attributes.Color
2+ ( Color(..)
3+ , black
4+ , red
5+ , green
6+ , yellow
7+ , blue
8+ , magenta
9+ , cyan
10+ , white
11+ , brightBlack
12+ , brightRed
13+ , brightGreen
14+ , brightYellow
15+ , brightBlue
16+ , brightMagenta
17+ , brightCyan
18+ , brightWhite
19+ )
20+where
221
322import Data.Word
423
@@ -56,3 +75,26 @@ import Data.Word
5675-- Seriously, terminal color support is INSANE.
5776data Color = ISOColor !Word8 | Color240 !Word8
5877 deriving ( Eq, Show, Read )
78+
79+-- | Standard 8-color ANSI terminal color codes.
80+black, red, green, yellow, blue, magenta, cyan, white :: Color
81+black = ISOColor 0
82+red = ISOColor 1
83+green = ISOColor 2
84+yellow = ISOColor 3
85+blue = ISOColor 4
86+magenta= ISOColor 5
87+cyan = ISOColor 6
88+white = ISOColor 7
89+
90+-- | Bright/Vivid variants of the standard 8-color ANSI
91+brightBlack, brightRed, brightGreen, brightYellow :: Color
92+brightBlue, brightMagenta, brightCyan, brightWhite :: Color
93+brightBlack = ISOColor 8
94+brightRed = ISOColor 9
95+brightGreen = ISOColor 10
96+brightYellow = ISOColor 11
97+brightBlue = ISOColor 12
98+brightMagenta= ISOColor 13
99+brightCyan = ISOColor 14
100+brightWhite = ISOColor 15