diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-22 17:22:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-24 09:02:41 +0000 |
| commit | e17c6fcbecf67a75bf8cd37995fac0e937b934cc (patch) | |
| tree | baf5b2991f72a93d7d680b465b8f2b1064dccce5 | |
| parent | readme: add OSC-9 to list of supported OSC sequences (diff) | |
render: color_dim(): retain alpha channel
| -rw-r--r-- | render.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -246,9 +246,10 @@ color_hex_to_pixman(uint32_t color) static inline uint32_t color_dim(uint32_t color) { + uint32_t alpha = color & 0xff000000; int hue, sat, lum; rgb_to_hsl(color, &hue, &sat, &lum); - return hsl_to_rgb(hue, sat, lum / 1.5); + return alpha | hsl_to_rgb(hue, sat, lum / 1.5); } static inline uint32_t |
