21 lines
490 B
C
21 lines
490 B
C
#ifndef COLOR_UTILS_H
|
|
#define COLOR_UTILS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct Color {
|
|
uint8_t g;
|
|
uint8_t r;
|
|
uint8_t b;
|
|
} Color;
|
|
|
|
Color hex_to_color(int hex);
|
|
Color hsv_to_color(double h, double s, double v);
|
|
void set_color(uint8_t* buffer, const Color color);
|
|
int construct_buffer(uint8_t* buffer,
|
|
const Color* colors,
|
|
const int num_leds,
|
|
const int color_bytes,
|
|
const int res_bytes);
|
|
|
|
#endif |