- Add color functions
luminance
andbest_for_contrast
. (by @chshersh in #5) - Add styling functions
fg
,bg
,bold
,dim
,italic
,underlined
. (by @chshersh in #6) - Add styling composition with
&
. (by @chshersh in #6) - Add function
make_rgb_hex
to parse hexadecimal codes into RGB colors. (by @chshersh in #7)
Color.t
andColor.Ground.t
are now polymorphic variants. (by @chshersh in #5)
Util.parenthesize_if
which is deemed unuseful and is kind of a duplicate ofTree.parenthesize_if
inFormatting
.
- Fixed a bug where unwanted
m
characters would appear in the output before every colored token
- Moved
Formatting.tokenize
andFormatting.format
to a dedicatedFormatting.Util
submodule - it is common for users who wish to implementTOKENIZABLE
toopen Formatting
, andFormatting.tokenize
would then shadow the user's own function, making it cumbersome if the latter was recursive. This does not affect theAnsifmt
prelude -format
stays available.
- Added
print_formatted
and theIO
submodule.
First pre-release.