2021-10-16 03:03:56 +00:00
|
|
|
# Style
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
A style object contains the following information:
|
|
|
|
|
2021-07-03 09:24:37 +00:00
|
|
|
- [fg][1]
|
|
|
|
- [bg][2]
|
|
|
|
- [add_modifiers][3]
|
|
|
|
- [sub_modifiers][4]
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
### fg
|
|
|
|
|
2021-07-03 09:24:37 +00:00
|
|
|
Type: nullable [Color][5]
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
The foreground color.
|
|
|
|
|
|
|
|
### bg
|
|
|
|
|
2021-07-03 09:24:37 +00:00
|
|
|
Type: nullable [Color][5]
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
The background color.
|
|
|
|
|
|
|
|
### add_modifiers
|
|
|
|
|
2021-07-03 09:24:37 +00:00
|
|
|
Type: nullable list of [Modifier][6]
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
Modifiers to add.
|
|
|
|
|
|
|
|
### sub_modifiers
|
|
|
|
|
2021-07-03 09:24:37 +00:00
|
|
|
Type: nullable list of [Modifier][6]
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
Modifiers to remove.
|
|
|
|
|
2021-10-16 03:03:56 +00:00
|
|
|
## Color
|
2021-06-22 11:52:46 +00:00
|
|
|
|
2023-07-13 13:12:21 +00:00
|
|
|
Color is a [sum type][7] that can be one of the following:
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
- "Reset"
|
|
|
|
- "Black"
|
|
|
|
- "Red"
|
|
|
|
- "Green"
|
|
|
|
- "Yellow"
|
|
|
|
- "Blue"
|
|
|
|
- "Magenta"
|
|
|
|
- "Cyan"
|
|
|
|
- "Gray"
|
|
|
|
- "DarkGray"
|
|
|
|
- "LightRed"
|
|
|
|
- "LightGreen"
|
|
|
|
- "LightYellow"
|
|
|
|
- "LightBlue"
|
|
|
|
- "LightMagenta"
|
|
|
|
- "LightCyan"
|
|
|
|
- "White"
|
|
|
|
- { Rgb = { int, int, int } }
|
|
|
|
- { Indexed = int }
|
|
|
|
|
2021-10-16 03:03:56 +00:00
|
|
|
## Modifier
|
2021-06-22 11:52:46 +00:00
|
|
|
|
2023-07-13 13:12:21 +00:00
|
|
|
Modifier is a [sum type][7] that can be one of the following:
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
- "Bold"
|
|
|
|
- "Dim"
|
|
|
|
- "Italic"
|
|
|
|
- "Underlined"
|
|
|
|
- "SlowBlink"
|
|
|
|
- "RapidBlink"
|
|
|
|
- "Reversed"
|
|
|
|
- "Hidden"
|
|
|
|
- "CrossedOut"
|
|
|
|
|
2021-10-16 03:03:56 +00:00
|
|
|
## Example
|
2021-06-22 11:52:46 +00:00
|
|
|
|
|
|
|
```lua
|
2021-11-04 13:09:44 +00:00
|
|
|
xplr.config.general.prompt.style.fg = "Red"
|
|
|
|
xplr.config.general.prompt.style.bg = { Rgb = { 100, 150, 200 } }
|
|
|
|
xplr.config.general.prompt.style.add_modifiers = { "Bold", "Italic" }
|
|
|
|
xplr.config.general.prompt.style.sub_modifiers = { "Hidden" }
|
2021-06-22 11:52:46 +00:00
|
|
|
```
|
2021-07-03 09:24:37 +00:00
|
|
|
|
2021-10-16 03:03:56 +00:00
|
|
|
[1]: #fg
|
|
|
|
[2]: #bg
|
|
|
|
[3]: #add_modifiers
|
|
|
|
[4]: #sub_modifiers
|
|
|
|
[5]: #color
|
|
|
|
[6]: #modifier
|
2023-07-13 13:12:21 +00:00
|
|
|
[7]: sum-type.md
|