summaryrefslogtreecommitdiff
path: root/src/ui/color.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-21 20:44:25 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-21 20:44:25 +0200
commite72764f55b49643160e387fb942ac113d66620cf (patch)
tree1eeefa631beb473fe85b6417d0f65d8a04cabfe2 /src/ui/color.h
parent18212214dda6f18bdc6bb21307668472b5726602 (diff)
Apply ANSI SGR background colors
The background color of the current text run can be changed via ANSI SGR control sequences. Improved the ANSI escape sequence regex to detect more than just SGR sequences, so they can be properly filtered out.
Diffstat (limited to 'src/ui/color.h')
-rw-r--r--src/ui/color.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/color.h b/src/ui/color.h
index 03172fcb..6602b226 100644
--- a/src/ui/color.h
+++ b/src/ui/color.h
@@ -255,7 +255,8 @@ iLocalDef void setHsl_Color(int color, iHSLColor hsl) {
255iBool loadPalette_Color (const char *path); 255iBool loadPalette_Color (const char *path);
256void setThemePalette_Color (enum iColorTheme theme); 256void setThemePalette_Color (enum iColorTheme theme);
257 257
258iColor ansiForeground_Color (iRangecc escapeSequence, int fallback); 258void ansiColors_Color (iRangecc escapeSequence, int fgDefault, int bgDefault,
259 iColor *fg_out, iColor *bg_out); /* can be NULL */
259const char * escape_Color (int color); 260const char * escape_Color (int color);
260enum iColorId parseEscape_Color (const char *cstr, const char **endp); 261enum iColorId parseEscape_Color (const char *cstr, const char **endp);
261 262