如何在 macOS Monterey 上的 bash 提示中设置主机名的颜色?

How do I set the color of my host name in my bash prompt on macOS Monterey?

我的 .bash_profile 文件中有以下行来设置我的自定义 bash 提示;

export PS1='\e[0;32m \[`[ $? = 0 ] && X=2 || X=1; tput setaf $X`\]\h\[`tput sgr0`\]:\w$ \e[m'

但主机名的颜色比显示的其余提示颜色稍深一些。如何将整个 bash 提示设置为相同颜色的浅绿色?

编号2是深绿色,试试10(==8+2):

export PS1='\e[0;32m \[`[ $? = 0 ] && X=10 || X=1; tput setaf $X`\]\h\[`tput sgr0`\]:\w$ \e[m'