Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Ansifmt.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.
fg color
is a convenient constructor for creating composable styles. Creates a style with the specified foreground color only. See &
for usage examples.
fg color
is a convenient constructor for creating composable styles. Creates a style with the specified background color only. See &
for usage examples.
bold
is a convenient constructor for creating composable styles. Creates a bold style only. See &
for usage examples.
dim
is a convenient constructor for creating composable styles. Creates a dim style only. See &
for usage examples.
italic
is a convenient constructor for creating composable styles. Creates an italic style only. See &
for usage examples.
underlined
is a convenient constructor for creating composable styles. Creates an underline style only. See &
for usage examples.
left & right
combines two styles with the following rules:
right
is taken if it's present, otherwise left
Usage example:
let my_style = Styling.(default_style & fg yellow & bg black & bold) in
to_ansi styling
renders the styling
to an ANSI escape sequence as a string.