^[[m, ^[[0m 转义码代表什么?

What do ^[[m, ^[[0m escape codes represent?

代码 ^[[00;00m 表示将颜色重置为默认值,但是,在某些程序中(例如源荧光笔 highlight)代码 ^[[m 的使用就好像它也可以提供相同的服务一样目的。 ANSI 对此类代码以及类似 ^[[0m?

的说明是什么

"ANSI" 在这种情况下很久以前就被 ECMA-48[= 淘汰了29=]。因此,合适的起点是该文档。

第 8.3.117 节 SGR - SELECT 图形再现

Notation: (Ps...) 
Representation: CSI Ps... 06/13 
Parameter default value: Ps = 0

SGR is used to establish one or more graphic rendition aspects for subsequent text. The established aspects remain in effect until the next occurrence of SGR in the data stream, depending on the setting of the GRAPHIC RENDITION COMBINATION MODE (GRCM). Each graphic rendition aspect is specified by a parameter value:

0

default rendition (implementation-defined), cancels the effect of any preceding occurrence of SGR in the data stream regardless of the setting of the GRAPHIC RENDITION COMBINATION MODE (GRCM)

0如果给定none就是默认参数(所以^[[m^[[0m是同一个意思,重复参数也没有区别(取消已经取消的东西并不会取消它),所以 ^[[00;00m still 意思是一样的。