package ocolor
Install
Dune Dependency
Authors
Maintainers
Sources
md5=648a95f1829c7a26172e7168e969962d
sha512=f825b57889f4ca6f074688c736c26c98192d1bee37e05d81c991b6a75d4e06009656afe6430f55426e83e6a6922f791e5d8b7cccf56f908b940702bd21eebec9
doc/ocolor/Ocolor_config/index.html
Module Ocolor_config
Source
Configuration
Sometimes, default configuration does not suit you. We go through setters and getters rather than just giving access to the underlying ref in order to allow some operations in the future when changing the configuration. For instance, if we cache color conversion, we might want to clear the cache when the configuration is changed.
Please note that the configuration is not automatic. This library aims to be as pure as possible, and thus does not provide any mechanism, to detect the terminal settings.
The kind of colors supported by the terminal. Except if done manually, every color will be encoded in the more expressible format possible. For instance, if the terminal support 8-bits colors, but the user try to print a 24-bits color, the result will be the clostest 8-bits color with respect to the distance in Lab color space
The separator used between each integer in SGR sequences. By default, this is ";". It should work in any terminal, but since it is not the only legal separator, it is configurable.
Change separator
.
The palette of the terminal. By default, this is Xterm
. It should be ok.
Change palette
.
The kind of colors the terminal can display. By default, this is Color24
. Most of terminals can display 24-bits colors. Used to downgrade colors to 8- or 4- bits colors, with respect to the capability of the terminal
Change color_capability
.
Whether Printf
-like functions reset the style after the print or not. Default to true
. But, prefer the Format
-like functions of Ocolor_format
.
Change auto_reset
.