rainbow-0.8.0.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 color foreground colors

8 color background colors

256 color foreground colors

256 color background colors

Utility functions

fc8 :: Maybe Color -> ChunkSource

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

bc8 :: Maybe Color -> ChunkSource

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

fc256 :: Maybe Color -> ChunkSource

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

bc256 :: Maybe Color -> ChunkSource

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