Expand description
Select Graphic Rendition (SGR) writer.
§Category
SGR is the CSI m family used for rendition attributes such as reset,
intensity, underline, foreground color, and background color. Higher-level
style construction lives outside this module; this module writes the raw
parameter grammar.
§Parameter conventions
The outer slice in write_sgr becomes semicolon-separated primary
parameters. Each inner slice becomes colon-separated subparameters, allowing
both classic SGR and colon-form color parameters.
§Mode interaction
SGR attributes are not enabled by a separate mode. They change the terminal’s active rendition state until another SGR sequence resets or modifies it.
Functions§
- write_
sgr - Write an SGR sequence using semicolon-separated groups and colon-separated subparameters.