Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Module juptune.core.util.ansi

Aliases

Name Description
Ansi8BitColour

An 8-bit ANSI colour - an index into the terminal's colour palette.

AnsiOnly

Used by certain functions to determine if they should only output an ANSI sequence, or output their entire sequence + data.

IsBgColour

Used to determine if an AnsiColouris a background or foreground colour.

Enums

Name Description
Ansi4BitColour

An enumeration of standard 4-bit colours.

AnsiColourType

COLOUR TYPES

AnsiSgrStyle

MISC TYPES

AnsiTextImplementationFeatures

An enumeration used by an AnsiTextimplementation to describe any special features that AnsiTextneeds to mold itself around.

Functions

Name Description
ansi

PUBLIC HELPERS

ansiAsSections

Constructs an AnsiSectionRangefrom the given slice.

ansiExecuteSgrSequence

READING/PARSING

Structs

Name Description
AnsiColour

Contains any type of ANSI colour and provides the ability to create a valid SGR command to set the foreground/background.

AnsiRgbColour

Contains a 3-byte, RGB colour.

AnsiSection

The resulting object from AnsiSectionRange, describes whether a slice of text is an ANSI sequence or not.

AnsiSectionRange

An input range of AnsiSections that splits a piece of text up into ANSI sequence and plain text sections.

AnsiStyle

Contains any number of styling options from AnsiStyleSgr, and provides the ability to generate an ANSI SGR command to apply all of the selected styling options.

AnsiStyleSet

DATA WITH COLOUR TYPES

AnsiTextLite

A lightweight alternative to AnsiTextwhich only supports a singular coloured string, at the cost of removing most of the other complexity & dynamic allocation needs of AnsiText.

Variables

Name Description
ANSI_COLOUR_END

The character used to denote that the sequence is an SGR sequence.

ANSI_COLOUR_RESET

The sequence used to reset all styling.

ANSI_CSI

The string that starts an ANSI command sequence.

ANSI_FG_TO_BG_INCREMENT

The amount to increment an Ansi4BitColourby in order to access the background version of the colour.

ANSI_SEPARATOR

The character that delimits ANSI parameters.