diff options
author | Raheman Vaiya <r.vaiya@gmail.com> | 2021-12-26 18:57:04 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-05-12 21:20:50 +0200 |
commit | 5dceed2bfa9c57c9e230b86e3834f7cba89bb0d1 (patch) | |
tree | f90baa6a48e28db70ef9e41bde7220a73efaf8f5 /x.c | |
parent | 7ad409ac2e8d4e9f9cae5f6984f7121cae292b14 (diff) | |
download | st-5dceed2bfa9c57c9e230b86e3834f7cba89bb0d1.tar.gz |
Add support for OSC color sequences
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -803,6 +803,19 @@ xloadcols(void) } 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) { Color ncolor; |