package ocolor
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=094b701f30af41b89f554e978cb0762c
sha512=b558fb735d28c262b0cf047835df2bc59e89daf44fbaf55b3d73293457713cb2a45805965f4bd6aafac1e7bc6325b3e70ec59d3e4a096b25e99072fee68ac8ce
doc/ocolor/Ocolor_types/index.html
Module Ocolor_types
Basic types and values
Types
Color types
The type of 4-bits colors. They are informally rgb colors where each component is in a scale from 0 to 1, with an additionnal intensity bit.
The type of rgb colors with each component in [0; 5]. This is used to encode the 6*6*6 color cube of 8-bits colors?
The type of a 8-bits color. Such a color is either a standard color, a 6*6*6 rgb color or some kind of grey on a 24-steps grayscale. Thus, the paramter of Grayscale should be in [0; 23]
The type of 24-bits colors. Each component belongs to [0; 255].
The type of a color that can be a 4-, 8- or 24-bits color.
Style types
type style = | Reset| Bold| Faint| Faint_bold_off| Italic| Italic_fraktur_off| Fraktur| DoubleUnderlined| Underlined| Underlined_off| Blink| Blink_off| Reverse_video| Reverse_video_off| Conceal| Conceal_off| Crossed_out| Crossed_out_off| Framed| Framed_encircled_off| Encircled| Overlined| Overlined_off| Default_font| Font of int| Fg of color| Default_fg| Bg of color| Default_bg
All style sequences that are implemented.
Resetdisables everything (returns to default)Boldenables bold fontFaintdecreases intensityFaint_bold_offrevert the effect ofBoldandFaintItalic: italic font (likely to not work)Fraktur: fraktur font (likely to not work)Italic_fraktur_off: disables italic and fraktur (likely to not work)Underlined: underlines textUnderlined_off: disable underlineBlinkandBlink_offenables and disables flow blink (fast blink is rarely supported)Reverse_videoandReverse_video_offas expectedConcealandConceal_offas excpected (rarely supported)Crossed_outandCrossed_out_offas excpectedFramed,EncircledandFramed_encircled_offas excpected (rarely supported)OverlinedandOverlined_offas excpectedDefault_fontset font to default (rarely supported)Fontset font to specified number (in [1;9]) (rarely supported)Fgset foreground color to specified colorDefault_fgset foreground color to default colorBgset background color to specified colorDefault_bgset background color to default color
Helpers and values
Iterators on finite (small) color space
val fold_color4 : (color4 -> 'acc -> 'acc) -> 'acc -> 'accval fold_cube6 : (cube6 -> 'acc -> 'acc) -> 'acc -> 'accval fold_color8 : (color8 -> 'acc -> 'acc) -> 'acc -> 'accUseful names for 4-bits colors
Standard 3-bits colors
val black : color4val red : color4val green : color4val blue : color4val yellow : color4val magenta : color4val cyan : color4val white : color4High intensity 4-bits colors
val hi_black : color4val hi_red : color4val hi_green : color4val hi_blue : color4val hi_yellow : color4val hi_magenta : color4val hi_cyan : color4val hi_white : color4Standard palettes types
module Color4Map : sig ... endmodule Color8Map : sig ... endtype color_palette = | VGA| CMD| Terminal_app| PuTTY| MIRC| Xterm| X| Ubuntu| Custom_palette of rgb Color4Map.t
The kind of palette the terminal uses. It is used to match a 4-bits color to a rgb color. This is useful to find the clostest 4-bits color to a rgb color, according to the actual colors.
module ColorPaletteMap : sig ... end