mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 19:39:39 -08:00
docs(color): update current color override information
This commit is contained in:
parent
d0a461a687
commit
808bbcaca7
|
@ -330,13 +330,16 @@ This means that for user Bill, who has a user account `Bill` on Windows and `bil
|
|||
|
||||
#### Standard colors
|
||||
|
||||
Oh My Posh supports four different color types being:
|
||||
Oh My Posh supports multiple different color references, being:
|
||||
|
||||
- Typical [hex colors][hexcolors] (for example `#CB4B16`).
|
||||
- 16 [ANSI color names][ansicolors].
|
||||
- The `transparent` keyword which can be used to create either a transparent foreground override
|
||||
or transparent background color using the segment's foreground property.
|
||||
- The `inherit` keyword which can be used to inherit the previous active segment's foreground and/or background color.
|
||||
- 16 [ANSI color names][ansicolors].
|
||||
- The `foreground` keyword which can be used to reference the current segment's foreground color.
|
||||
- The `background` keyword which can be used to reference the current segment's background color.
|
||||
- The `parentForeground` keyword which can be used to inherit the previous active segment's foreground color.
|
||||
- The `parentBackground` keyword which can be used to inherit the previous active segment's background color.
|
||||
|
||||
These include 8 basic ANSI colors and `default`:
|
||||
|
||||
|
@ -349,11 +352,11 @@ Oh My Posh supports four different color types being:
|
|||
#### Color overrides
|
||||
|
||||
You have the ability to override the foreground and/or background color for text in any property that accepts it.
|
||||
The syntax is custom but should be rather straight-forward:
|
||||
`<#ffffff,#000000>this is white with black background</> <#FF479C>but this is pink</>`. Anything between the color start
|
||||
`<#FF479C>` and end `</>` will be colored accordingly.
|
||||
The syntax is custom but should be rather straight-forward: `<foreground,background>text</>`. For example,
|
||||
`<#ffffff,#000000>this is white with black background</> <#FF479C>but this is pink</>`.
|
||||
Anything between the color start `<#FF479C>` and end `</>` will be colored accordingly.
|
||||
|
||||
For example, if you want `prefix` to print a colored bracket that isn't the same as the segment's `foreground`, you can
|
||||
If you want `prefix` to print a colored bracket that isn't the same as the segment's `foreground`, you can
|
||||
do so like this:
|
||||
|
||||
```json
|
||||
|
|
Loading…
Reference in a new issue