[][src]Module termimage::util

Module containing various utility functions.

Statics

ANSI_BG_COLOUR_ESCAPES

ANSI background colour escapes.

ANSI_COLOURS_BLACK_BG

Linux-theme ANSI colours, in the same order as ANSI_COLOUR_ESCAPES.

ANSI_COLOURS_WHITE_BG

ANSI colours for a white-background terminal, in the same order as ANSI_COLOUR_ESCAPES.

ANSI_COLOUR_ESCAPES

ANSI background colour escapes.

ANSI_RESET_ATTRIBUTES

Reset ANSI attributes

BMP_MAGIC

Magic number used for determining whether an image is a BMP.

GIF_MAGIC

Magic number used for determining whether an image is a GIF.

ICO_MAGIC

Magic number used for determining whether an image is an ICO.

JPEG_MAGIC

Magic number used for determining whether an image is a JPEG.

PNG_MAGIC

Magic number used for determining whether an image is a PNG.

Functions

bg_colours_for

Get the background colour set for the specified foregournd colour set

closest_colour

Get the closest colour to the provided one out of the specified list of colours and retirn its index.

mul_str

Create a string consisting of n repetitions of what.