From b492e69682945fdf0ada95a66edd1e2cb637eabd Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Mon, 11 Nov 2024 23:04:59 +0100 Subject: Add ring effect --- src/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 563e17d..42047ea 100644 --- a/src/util.h +++ b/src/util.h @@ -25,6 +25,11 @@ static inline color_t color_rgb(int r, int g, int b) return color_rgba(r, g, b, 255); } +static inline color_t color_hex(unsigned int h) +{ + return color_rgb((h >> 16) & 0xff, (h >> 8) & 0xff, h & 0xff); +} + char *color_to_string(color_t *color); void color_print(FILE *stream, color_t *color); -- cgit v1.2.3