package ansifmt

  1. Overview
  2. Docs
A simple, lightweight library for ANSI formatting

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ansifmt-0.1.3.tbz
sha256=88bfb44072d2de404757fd8e10b08b10c53c2b03b29bd7c040c32646bf209db0
sha512=a707c0aa0b1389af1e30bf252cc2d35a800dba9f9b80c3626791cd1b33d7a550f53727176bf64c3862cbfaff71ef651458da158f741d771b4cf006f5971c9671

doc/ansifmt/Ansifmt/Styling/index.html

Module Ansifmt.StylingSource

Sourcetype t = {
  1. foreground : Color.t option;
  2. background : Color.t option;
  3. bold : bool;
  4. dim : bool;
  5. italic : bool;
  6. underlined : bool;
}
Sourceval none : t

none is the empty styling.

Sourceval create : ?foreground:Color.t -> ?background:Color.t -> ?bold:bool -> ?dim:bool -> ?italic:bool -> ?underlined:bool -> unit -> t

create ?foreground ?background ?bold ?dim ?italic ?underlined () creates a new style object given the provided configuration.

Sourceval to_ansi : t -> string

to_ansi styling renders the styling to an ANSI escape sequence as a string.