mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
31 lines
475 B
C
31 lines
475 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
uint8_t r;
|
|
uint8_t g;
|
|
uint8_t b;
|
|
} RgbColor;
|
|
|
|
typedef struct {
|
|
uint8_t h;
|
|
uint8_t s;
|
|
uint8_t v;
|
|
} HsvColor;
|
|
|
|
int rgbcmp(const RgbColor* a, const RgbColor* b);
|
|
int hsvcmp(const HsvColor* a, const HsvColor* b);
|
|
|
|
void hsv2rgb(const HsvColor* hsv, RgbColor* rgb);
|
|
void rgb2hsv(const RgbColor* rgb, HsvColor* hsv);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|