Style and color
style
style: (fg: <color>, bg: <color>, modifiers: <modifiers>)
Style object is used for various configuration options. It has three optional properties which can be set to None or ommited completely.
- Foreground color
fg: None | Some(<color>)
- Background color
bg: None | Some(<color>)
- Modifiers - various text modifiers
modifiers: None | Some("Bold" | "Dim" | "Italic" | "Underlined" | "Reversed" | "CrossedOut")
color
Color is represented as a string value and supports multiple formats:
- 16 ANSI terminal colors as configured by your terminal
fg: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "gray" | "dark_gray" | "light_red" | "light_green" | "light_yellow" | "light_blue" | "light_magenta" | "light_cyan" | "white"
- Hex value, ie.
#ff0000
fg: "#rrggbb" - Rgb value, ie.
rgb(255, 0, 0)
fg: "rgb(R, G, B)" - Indexed, 8-bit color lookup table. See this wikipedia article for more info.
fg: "17"