1Setting text styles/colors in arbitrary regions of the screen
2------------------------------------------------------------------
3
4There already exists an escape code to set *some* text attributes in arbitrary
5regions of the screen, `DECCARA
6<https://vt100.net/docs/vt510-rm/DECCARA.html>`_.  However, it is limited to
7only a few attributes. |kitty| extends this to work with *all* SGR attributes.
8So, for example, this can be used to set the background color in an arbitrary
9region of the screen.
10
11The motivation for this extension is the various problems with the existing
12solution for erasing to background color, namely the *background color erase
13(bce)* capability. See
14`this discussion <https://github.com/kovidgoyal/kitty/issues/160#issuecomment-346470545>`_
15and `this FAQ <https://invisible-island.net/ncurses/ncurses.faq.html#bce_mismatches>`_
16for a summary of problems with *bce*.
17
18For example, to set the background color to blue in a
19rectangular region of the screen from (3, 4) to (10, 11), you use::
20
21    <ESC>[2*x<ESC>[4;3;11;10;44$r<ESC>[*x
22