Safe Haskell | None |
---|---|
Language | Haskell2010 |
All the main types in Rainbow. Using this module you can specify
that you want different formatting for 8- and 256-color terminals.
Many of the names in this module conflict with the names in
Rainbow, so it's probably best to import
this module
qualified
.
- newtype Color a = Color (Maybe a)
- data Enum8
- enum8toWord8 :: Enum8 -> Word8
- black :: Enum8
- red :: Enum8
- green :: Enum8
- yellow :: Enum8
- blue :: Enum8
- magenta :: Enum8
- cyan :: Enum8
- white :: Enum8
- grey :: Word8
- brightRed :: Word8
- brightGreen :: Word8
- brightYellow :: Word8
- brightBlue :: Word8
- brightMagenta :: Word8
- brightCyan :: Word8
- brightWhite :: Word8
- data Format = Format {}
- underline :: Lens' Format Bool
- strikeout :: Lens' Format Bool
- italic :: Lens' Format Bool
- invisible :: Lens' Format Bool
- inverse :: Lens' Format Bool
- faint :: Lens' Format Bool
- bold :: Lens' Format Bool
- blink :: Lens' Format Bool
- data Style a = Style {}
- format :: forall a. Lens' (Style a) Format
- fore :: forall a. Lens' (Style a) (Color a)
- back :: forall a. Lens' (Style a) (Color a)
- data Scheme = Scheme {}
- style8 :: Lens' Scheme (Style Enum8)
- style256 :: Lens' Scheme (Style Word8)
- data Chunk a = Chunk {}
- chunk :: a -> Chunk a
- yarn :: forall a a. Lens (Chunk a) (Chunk a) a a
- scheme :: forall a. Lens' (Chunk a) Scheme
- data Radiant = Radiant {}
- color8 :: Lens' Radiant (Color Enum8)
- color256 :: Lens' Radiant (Color Word8)
Documentation
A color; a Nothing
value means that the terminal's default
color is used. The type of the Maybe
generally will be an
Enum8
to represent one of 8 colors, or a Word8
to represent one
of 256 colors.
Functor Color | |
Foldable Color | |
Traversable Color | |
Eq a => Eq (Color a) | |
Ord a => Ord (Color a) | |
Show a => Show (Color a) | |
Generic (Color a) | |
Monoid (Color a) | Takes the last non-Nothing Color. |
Wrapped (Color a) | |
(~) * (Color a1) t0 => Rewrapped (Color a) t | |
Typeable (* -> *) Color | |
type Rep (Color a) | |
type Unwrapped (Color a0) = Maybe a0 |
A simple enumeration for eight values. Represents eight colors.
enum8toWord8 :: Enum8 -> Word8 Source
Text formatting such as bold, italic, etc.
The foreground and background color, and the Format
. This
represents all colors and formatting attributes for either an 8- or
256-color terminal.
Holds the Style
for both 8- and 256-color terminals.
A chunk is some textual data coupled with a description of what color the text is, attributes like whether it is bold or underlined, etc. The chunk knows what foreground and background colors and what attributes to use for both an 8 color terminal and a 256 color terminal.
Functor Chunk | |
Foldable Chunk | |
Traversable Chunk | |
Eq a => Eq (Chunk a) | |
Ord a => Ord (Chunk a) | |
Show a => Show (Chunk a) | |
Generic (Chunk a) | |
Monoid a => Monoid (Chunk a) | Uses the underlying |
Typeable (* -> *) Chunk | |
type Rep (Chunk a) |
Stores colors that may affect 8-color terminals, 256-color terminals, both, or neither.
Eq Radiant | |
Ord Radiant | |
Show Radiant | |
Generic Radiant | |
Monoid Radiant | Uses the underlying |
Typeable * Radiant | |
type Rep Radiant |