aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorRaheman Vaiya <r.vaiya@gmail.com>2021-12-26 18:57:04 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-12-26 18:57:44 +0100
commit8e310303903792c010d03c046ba75f8b18f7d3a7 (patch)
treef634e71e556b312e64ed1cc9ddd5b1e3fb3ced71 /x.c
parent2f6e597ed871cff91c627850d03152cae5f45779 (diff)
downloadst-patched-8e310303903792c010d03c046ba75f8b18f7d3a7.tar.bz2
st-patched-8e310303903792c010d03c046ba75f8b18f7d3a7.tar.xz
st-patched-8e310303903792c010d03c046ba75f8b18f7d3a7.zip
Add support for OSC color sequences
Diffstat (limited to 'x.c')
-rw-r--r--x.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/x.c b/x.c
index 89786b8..8a16faa 100644
--- a/x.c
+++ b/x.c
@@ -800,6 +800,19 @@ xloadcols(void)
800} 800}
801 801
802int 802int
803xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
804{
805 if (!BETWEEN(x, 0, dc.collen))
806 return 1;
807
808 *r = dc.col[x].color.red >> 8;
809 *g = dc.col[x].color.green >> 8;
810 *b = dc.col[x].color.blue >> 8;
811
812 return 0;
813}
814
815int
803xsetcolorname(int x, const char *name) 816xsetcolorname(int x, const char *name)
804{ 817{
805 Color ncolor; 818 Color ncolor;