package spin

  1. Overview
  2. Docs
type color =
  1. | Default
  2. | Black
  3. | Red
  4. | Green
  5. | Yellow
  6. | Blue
  7. | Magenta
  8. | Cyan
  9. | White
  10. | BlackBright
  11. | RedBright
  12. | GreenBright
  13. | YellowBright
  14. | BlueBright
  15. | MagentaBright
  16. | CyanBright
  17. | WhiteBright

Module to style a string in the terminal.

This tries to mimic Pastel's API. As Pastel is not on Opam, we don't want to depend on if for now. Once it is release, however, we would like to replace this module by Pastel.

type t = {
  1. bold : Base.bool;
  2. dim : Base.bool;
  3. italic : Base.bool;
  4. underline : Base.bool;
  5. inverse : Base.bool;
  6. hidden : Base.bool;
  7. strikethrough : Base.bool;
  8. color : color;
  9. background : color;
}
val default : t
module Style : sig ... end
val make : ?bold:Base.bool -> ?dim:Base.bool -> ?italic:Base.bool -> ?underline:Base.bool -> ?inverse:Base.bool -> ?hidden:Base.bool -> ?strikethrough:Base.bool -> ?color:color -> ?background:color -> Base.String.t Base.List.t -> Base.String.t
OCaml

Innovation. Community. Security.