diff options
author | Raheman Vaiya <r.vaiya@gmail.com> | 2021-12-26 18:57:04 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-12-26 18:57:44 +0100 |
commit | 8e310303903792c010d03c046ba75f8b18f7d3a7 (patch) | |
tree | f634e71e556b312e64ed1cc9ddd5b1e3fb3ced71 /x.c | |
parent | 2f6e597ed871cff91c627850d03152cae5f45779 (diff) |
Add support for OSC color sequences
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -800,6 +800,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; |