package ansifmt

  1. Overview
  2. Docs

Module Ansi.Attributes

type t

Represents the attributes of an ANSI SGR escape sequence.

val create : ?parameters:int list -> int -> t

create ?parameters code produces a new attribute record given a SGR code and its parameters. If parameters are not provided, the default is an empty list.

val compose : t -> t -> t

compose left right combines two attribute records into one, with left being the primary one.

val serialize : t -> string

serialize record produces a serialized representation of the record.

val show : t -> string

show record renders the record such that it can be used to construct a full ANSI SGR escape sequence.

val (&) : t -> t -> t

left & right is the same as compose left right.