PROMPT="%{$fgbold[blue]%}%n@%m%{$resetcolor%} [%{$fg_bold[cyan]%}%~%{$reset_color%}]" 这是…
Private research annotation
Sign in to add a private research label or note.
- User
PROMPT="%{reset_color%} [%{reset_color%}]" 这是 linux oh-my-zsh 主题的一行自定义设置,我需要把 blue 换成一个 自定义颜色 #94CEE7 怎么设置
Assistant
在 oh-my-zsh 中,你不能直接使用十六进制颜色代码来设置颜色。你需要将你的颜色转换为 ANSI 颜色代码。但是,标准的 ANSI 颜色并不支持那么多的颜色,只有一些预设的颜色(比如 red, green, blue 等)。
然而,你也可以使用 256 色的 ANSI 颜色调色板,或者真彩色(如果终端支持的话)。对于 256 色调色板,你可以使用一些在线工具来找到最接近的颜色。对于真彩色,你可以直接使用 RGB 值。
对于你的颜色 #94CEE7,在 256 色调色板中最接近的颜色可能是 80。所以你可以这样设置:
bashPROMPT="%{$fg_bold[80]%}%n@%m%{$reset_color%} [%{$fg_bold[cyan]%}%~%{$reset_color%}]"如果你的终端支持真彩色,你可以使用以下设置:
bashPROMPT="%{$fg_bold[38;2;148;206;231]%}%n@%m%{$reset_color%} [%{$fg_bold[cyan]%}%~%{$reset_color%}]"这里的
38;2;R;G;B是真彩色的 ANSI 代码,分别代表设置前景色为真彩色,并给出 RGB 值。
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.