on master help sign in
Clarify haddock for ANSI colors
ed27311Colby Jenn
src/Graphics/Vty/Attributes.hs+31−1
@@ -58,7 +58,37 @@ module Graphics.Vty.Attributes
58 , withURL
58 , withURL
59
59
60 -- * Colors
60 -- * Colors
61+ , Color(..)
62+
63+ -- ** Fixed Colors
64+ -- | Standard 8-color ANSI terminal color codes.
65+ --
66+ -- Note that these map to colors in the terminal's custom palette. For
67+ -- instance, `white` maps to whatever the terminal color theme uses for
68+ -- white.
69+ --
70+ -- Use these functions if you want to make apps that fit the terminal theme.
71+ -- If you want access to more/stronger colors use
61− , module Graphics.Vty.Attributes.Color
72+ -- `Graphics.Vty.Attributes.Color240.rgbColor`
73+ , black
74+ , red
75+ , green
76+ , yellow
77+ , blue
78+ , magenta
79+ , cyan
80+ , white
81+
82+ -- | Bright/Vivid variants of the standard 8-color ANSI
83+ , brightBlack
84+ , brightRed
85+ , brightGreen
86+ , brightYellow
87+ , brightBlue
88+ , brightMagenta
89+ , brightCyan
90+ , brightWhite
91+ -- ** Creating Colors From RGB
62 , module Graphics.Vty.Attributes.Color240
92 , module Graphics.Vty.Attributes.Color240
63 )
93 )
64where
94where
src/Graphics/Vty/Attributes/Color.hs−2
@@ -80,7 +80,6 @@ import Control.DeepSeq
80data Color = ISOColor !Word8 | Color240 !Word8
80data Color = ISOColor !Word8 | Color240 !Word8
81 deriving ( Eq, Show, Read, Generic, NFData )
81 deriving ( Eq, Show, Read, Generic, NFData )
82
82
83−-- | Standard 8-color ANSI terminal color codes.
84black, red, green, yellow, blue, magenta, cyan, white :: Color
83black, red, green, yellow, blue, magenta, cyan, white :: Color
85black = ISOColor 0
84black = ISOColor 0
86red = ISOColor 1
85red = ISOColor 1
@@ -91,7 +90,6 @@ magenta= ISOColor 5
91cyan = ISOColor 6
90cyan = ISOColor 6
92white = ISOColor 7
91white = ISOColor 7
93
92
94−-- | Bright/Vivid variants of the standard 8-color ANSI
95brightBlack, brightRed, brightGreen, brightYellow :: Color
93brightBlack, brightRed, brightGreen, brightYellow :: Color
96brightBlue, brightMagenta, brightCyan, brightWhite :: Color
94brightBlue, brightMagenta, brightCyan, brightWhite :: Color
97brightBlack = ISOColor 8
95brightBlack = ISOColor 8