rainbow-0.14.0.2: Print text to terminal with colors and effects

Safe HaskellSafe-Inferred

System.Console.Rainbow.Colors

Contents

Description

Ordinarily you should not need this module. Typically you will just need to use System.Console.Rainbow.ColorChunks, which is re-exported from System.Console.Rainbow. However this module can be useful if you want names for individual colors, as opposed to names for chunks, which is what System.Console.Rainbow.ColorChunks provides.

Synopsis

Color types

data Color8 Source

Color for an 8-color terminal.

Instances

unColor8 :: Color8 -> Maybe ColorSource

Nothing indicates to use the default color for the terminal; otherwise, the Terminfo Color is returned.

data Color256 Source

Color for an 256-color terminal.

unColor256 :: Color256 -> Maybe ColorSource

Nothing indicates to use the default color for the terminal; otherwise, the Terminfo Color is returned.

to256 :: Color8 -> Color256Source

Any color for an 8-color terminal can also be used in a 256-color terminal.

8 colors, named

8 colors, numbered

All 8-colors

c8_all :: [(Int, Color8)]Source

All colors available for an 8-color terminal, in an association list indexed by color number. Does not include the default color, c8_default.

256 colors, named

256 colors, bright

256 colors, numbered

All 256-colors

c256_all :: [(Int, Color256)]Source

All available colors for a 256-color terminal, in an association list by color number. Does not include the default color, c256_default.