SGR top-level constant

String const SGR

Select Graphic Rendition.

Representation: CSI s... \x6D

Parameter default value: s = 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)
  • 1 - bold or increased intensity
  • 2 - dim, decreased intensity or second colour
  • 3 - italic
  • 4 - underline
  • 5 - blink
  • 6 - blink rapid
  • 7 - inverse
  • 8 - invisible characters
  • 9 - strikethrough (characters still legible but marked as to be deleted)
  • 10 - primary (default) font
  • 11 - first alternative font
  • 12 - second alternative font
  • 13 - third alternative font
  • 14 - fourth alternative font
  • 15 - fifth alternative font
  • 16 - sixth alternative font
  • 17 - seventh alternative font
  • 18 - eighth alternative font
  • 19 - ninth alternative font
  • 20 - Fraktur (Gothic)
  • 21 - doubly underline
  • 22 - normal colour or normal intensity (neither bold nor dim)
  • 23 - not italicized, not fraktur
  • 24 - not underline (neither singly nor doubly)
  • 25 - steady (not blink)
  • 26 - (reserved for proportional spacing as specified in CCITT Recommendation T.61)
  • 27 - positive (not inverse)
  • 28 - revealed (not invisible)
  • 29 - not strikethrough
  • 30 - black display
  • 31 - red display
  • 32 - green display
  • 33 - yellow display
  • 34 - blue display
  • 35 - magenta display
  • 36 - cyan display
  • 37 - white display
  • 38 - (reserved for future standardization; intended for setting character foreground colour as specified in ISO - 8613-6 (CCITT Recommendation T.416))
  • 39 - default display colour (implementation-defined)
  • 40 - black background
  • 41 - red background
  • 42 - green background
  • 43 - yellow background
  • 44 - blue background
  • 45 - magenta background
  • 46 - cyan background
  • 47 - white background
  • 48 - (reserved for future standardization; intended for setting character background colour as specified in ISO 8613-6 (CCITT Recommendation T.416))
  • 49 - default background colour (implementation-defined)
  • 50 - (reserved for cancelling the effect of the rendering aspect established by parameter value 26)
  • 51 - framed
  • 52 - encircled
  • 53 - overlined
  • 54 - not framed, not encircled
  • 55 - not overlined
  • 56 - (reserved for future standardization)
  • 57 - (reserved for future standardization)
  • 58 - (reserved for future standardization)
  • 59 - (reserved for future standardization)
  • 60 - ideogram underline or right side line
  • 61 - ideogram double underline or double line on the right side
  • 62 - ideogram overline or left side line
  • 63 - ideogram double overline or double line on the left side
  • 64 - ideogram stress marking
  • 65 - cancels the effect of the rendition aspects established by parameter values 60 to 64

NOTE

The usable combinations of parameter values are determined by the implementation.

See also: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

Implementation

const String SGR = 'm';