diff options
| author | Federico Angelilli <code@fedang.net> | 2024-11-11 23:04:59 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-11-11 23:04:59 +0100 |
| commit | b492e69682945fdf0ada95a66edd1e2cb637eabd (patch) | |
| tree | 78ee37d02764dcc1511b7f7ea6b820058d4f9c9a /src/util.h | |
| parent | b1bde5b6fe35f9ff94ae480d37c365410b94a43b (diff) | |
Add ring effectrewrite
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |
