How to: How do I change prompt colors?
You can either [change the color palette used by your terminal](
  #change-the-color-palette-used-by-your-terminal) or
[set colors through Powerlevel10k configuration parameters](
  #set-colors-through-Powerlevel10k-configuration-parameters).

#### Change the color palette used by your terminal

How exactly you change the terminal color palette (a.k.a. color scheme, or theme) depends on the
kind of terminal you are using. Look around in terminal's settings/preferences or consult
documentation.

When you change the terminal color palette, it usually affects only the first 16 colors, numbered
from 0 to 15. In order to see any effect on Powerlevel10k prompt, you need to use prompt style that
utilizes these low-numbered colors. Type `p10k configure` and select *Rainbow*, *Lean* → *8 colors*
or *Pure* → *Original*. Other styles use higher-numbered colors, so they look the same in any
terminal color palette.

#### Set colors through Powerlevel10k configuration parameters

Open `~/.p10k.zsh`, search for "color", "foreground" and "background" and change values of
appropriate parameters. For example, here's how you can set the foreground of `time` prompt segment
to bright red:

```zsh
typeset -g POWERLEVEL9K_TIME_FOREGROUND=160
```

Colors are specified using numbers from 0 to 255. Colors from 0 to 15 look differently in different
terminals. Many terminals also support customization of these colors through color palettes
(a.k.a. color schemes, or themes). Colors from 16 to 255 always look the same.

Type `source ~/.p10k.zsh` to apply your changes to the current Zsh session.

To see how different numbered colors look in your terminal, run the following command:

```zsh
for i in {0..255}; do print -Pn "%K{$i}  %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
```

If your terminal supports truecolor, you can use 24-bit colors in the `#RRGGBB` format in addition
to the numbered colors.

```zsh
typeset -g POWERLEVEL9K_TIME_FOREGROUND='#FF0000'
```

*Related:*
  - [Directory is difficult to see in prompt when using Rainbow style.](
      #directory-is-difficult-to-see-in-prompt-when-using-rainbow-style)
  - [Incorrect foreground color in VSCode Terminal.](#incorrect-foreground-color-in-vscode-terminal)

By default, VSCode Terminal may arbitrarily replace the foreground color of your choice with a
different color. This behavior can be
[turned off](https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio) in
VSCode settings.