Add support for OSC color sequences

This commit is contained in:
Raheman Vaiya
2021-12-26 18:57:04 +01:00
committed by Hiltjo Posthuma
parent 2f6e597ed8
commit 8e31030390
4 changed files with 100 additions and 4 deletions

13
x.c
View File

@ -799,6 +799,19 @@ xloadcols(void)
loaded = 1;
}
int
xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
{
if (!BETWEEN(x, 0, dc.collen))
return 1;
*r = dc.col[x].color.red >> 8;
*g = dc.col[x].color.green >> 8;
*b = dc.col[x].color.blue >> 8;
return 0;
}
int
xsetcolorname(int x, const char *name)
{