Colorized library for adding color and style to text output. This library provides functionality to change the foreground and background colors, as well as to apply various text styles.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
The Colorized class defines an interface for colorizing and styling text. It provides methods
for applying color to the foreground or background, and for applying different text styles.
Instances
@[inline]
Applies a section/color to a string.
Equations
- Colorized.colorizeString Colorized.Section.Foreground col str = toString Colorized.const✝ ++ toString "9" ++ toString (repr col) ++ toString "m" ++ toString str ++ toString Colorized.reset✝
- Colorized.colorizeString Colorized.Section.Background col str = toString Colorized.const✝ ++ toString "4" ++ toString (repr col) ++ toString "m" ++ toString str ++ toString Colorized.reset✝
Instances For
@[inline]
Applies a style to a string.
Equations
- Colorized.stylizeString sty str = toString Colorized.const✝ ++ toString (repr sty) ++ toString "m" ++ toString str ++ toString Colorized.reset✝
Instances For
@[implicit_reducible]
Equations
- Colorized.instColorizedString = { colorize := Colorized.colorizeString, style := Colorized.stylizeString }