在Linux控制台中使用256色

Linux控制台和xterm可以支持256种颜色定义,在转义序列中使用256色的语法: Set the foreground color to index N: \033[38;5;${N}m Set the background color to index M: \033[48;5;${M}m ${N}代表颜色代码的变量,当然也可以写常量值,例 如:\033[00;38;5;51m 我的PS1
相关文章
相关标签/搜索