freshly installed zsh, oh_my_zsh, and added zsh-autosuggestions plugin
if I do this It's working fine.
% zsh -df
% source path/to/zsh-autosuggestions.zsh

default color should be dark gray

Thank you
Same thing happens to me with tmux

Check with the command echotc Co, "it indicates a limit on the number of colours which will be enforced by the line editor." (cit).
If it return 8 you can use only black, red, green, yellow, blue, magenta, cyan and white as foreground colors in ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE variable: ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=blue"
edit:
my solution was to set TERM=xterm-256color in .zshrc' file, before setting the fg color:
TERM=xterm-256color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8"
Worked for me
Didn't work for me on iTerm with p10k and oh my zsh.
echotc Co is giving me 256.
My config has
TERM=xterm-256color
zle_highlight+=(paste:none)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=241,bold,underline"
It works when I open a new tab, but when I then run source ~/.zshrc in the same tab it loses the autosuggestion color and looks similar to the original screenshot.
Do you happen to have the FORCE_FLOAT option set? See my issue #565 , where I solved my problem with this by simply unsetting this option.
Unfortunately not, I just checked any and all zsh config I could find if FORCE_FLOAT is set anywhere and also checked setopt after sourcing ~/.zshrc and it's not set. Similarly, unsetopt FORCE_FLOAT does nothing in ways of resolving the issue for me.
I'm having the same issue with macOS and iTerm2
It works when I open a new tab, but when I then run source ~/.zshrc in the same tab it loses the autosuggestion color and looks similar to the original screenshot."
same issue for me on Ubuntu 18.04.5, zsh 5.4.2
Most helpful comment
Check with the command
echotc Co, "it indicates a limit on the number of colours which will be enforced by the line editor." (cit).If it return
8you can use onlyblack, red, green, yellow, blue, magenta, cyan and whiteas foreground colors inZSH_AUTOSUGGEST_HIGHLIGHT_STYLEvariable:ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=blue"edit:
my solution was to set
TERM=xterm-256colorin .zshrc' file, before setting the fg color: