From 808bbcaca7022c39a4142c24023deeb710bc7135 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Wed, 10 Nov 2021 13:08:29 +0100 Subject: [PATCH] docs(color): update current color override information --- docs/docs/configuration.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index 9e6988ce..98178d05 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -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: `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