Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have color config of my shell

PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'

how to use hex color code?

share|improve this question
add comment

2 Answers 2

I do not believe that you can use hex color codes with zsh, or even with any shell. To my knowledge, standard Linux terminals can only display certain pre-defined colors. With that in mind, I doubt that hex color codes have been coded into zsh, or even could be, as that would force your terminal/tty to use non-standard colors, some of which it might not have the capability to use.

share|improve this answer
add comment

That's right you can't use hex colors. There are only 8 available colors:

30 - black
31 - red
32 - green
33 - yellow
34 - blue
35 - magenta
36 - cyan
37 - white

however you can change what colors these color names represent in you terminal preferences.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.