package lambda-term

  1. Overview
  2. Docs
Terminal manipulation library for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

lambda-term-3.3.1.tbz
sha256=5b77cbe096d56ae9157cb1fb55fb4e9028c89e841b1d2bfad4f13d8a1395db3c
sha512=d7968ad000c9c7e899ffb7fdd0016009f41c71d9fad4897decbe66ea24140ab1ee8428fd550c7b8016e7f6343f41e7abd53b52b5f2bf6bb85b4de64f12ac9161

doc/lambda-term/LTerm_style/index.html

Module LTerm_styleSource

Text styles

Colors
Sourcetype color = private
  1. | Default
    (*

    The default color of the terminal.

    *)
  2. | Index of int
    (*

    A color given by its index. Most terminal have at least 8 colors.

    *)
  3. | RGB of int * int * int
    (*

    A color given by its three component between 0 and 255. The closest color will be used.

    *)
Sourceval default : color
Sourceval index : int -> color
Sourceval rgb : int -> int -> int -> color

rgb r g b raises Invalid_argument if one of r, g or b is not in the range 0..255.

Standard colors
Sourceval black : color
Sourceval red : color
Sourceval green : color
Sourceval yellow : color
Sourceval blue : color
Sourceval magenta : color
Sourceval cyan : color
Sourceval white : color
Light colors
Sourceval lblack : color
Sourceval lred : color
Sourceval lgreen : color
Sourceval lyellow : color
Sourceval lblue : color
Sourceval lmagenta : color
Sourceval lcyan : color
Sourceval lwhite : color
Styles
Sourcetype t = {
  1. bold : bool option;
  2. underline : bool option;
  3. reverse : bool option;
  4. foreground : color option;
  5. background : color option;
}

Type of text styles.

Sourceval bold : t -> bool option
Sourceval underline : t -> bool option
Sourceval reverse : t -> bool option
Sourceval foreground : t -> color option
Sourceval background : t -> color option
Sourceval none : t

Style with all fields set to None.

Sourceval merge : t -> t -> t

merge s1 s2 is s2 with all undefined fields set to ones of s1.

Sourceval equal : t -> t -> bool

equal s1 s2 returns true iff s1 and s2 are equal after having replaced all None fields by Some false or Some Default.

OCaml

Innovation. Community. Security.