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

Safe HaskellNone

System.Console.Rainbow.ColorChunks

Contents

Description

Color chunks.

Names in this module follow these connventions:

  • The prefix f_ indicates that a Chunk affects foreground colors. The prefix b_ indicates background colors.
  • The prefix c8_ indicates that a Chunk affects 8-color terminals only; c256_ indicates 256-color terminals only. If a Chunk has neither prefix, it affects both 8- and 256-color terminals.
  • Some colors have names. The color names assume a palette similar to the default one that xterm uses. Other colors simply have numbers. Ultimately the interpretation of either named or numbered colors is up to the user's terminal.

Synopsis

Colors for both 8 and 256 color terminals

Foreground colors

Background colors

Specific colors

8 colors, foreground, named

8 colors, background, named

8 colors, foreground, numbered

8 colors, background, numbered

256 colors, foreground, named

256 colors, background, named

256 colors, foreground, bright, named

256 colors, background, bright, named

256 colors, foreground, numbered

256 colors, background, numbered

Utility functions

fc8 :: Color8 -> ChunkSource

Make a Color into a 8-color foreground Chunk.

bc8 :: Color8 -> ChunkSource

Make a terminfo Color into a 8-color background Chunk.

fc256 :: Color256 -> ChunkSource

Make a terminfo Color into a 256-color foreground Chunk.

bc256 :: Color256 -> ChunkSource

Make a terminfo Color into a 256-color background Chunk.