2023-04-13 00:27:08 +03:00
|
|
|
#ifndef _UI__COLOR_H
|
|
|
|
#define _UI__COLOR_H
|
|
|
|
|
|
|
|
typedef struct UIRGBA {
|
|
|
|
double r, g, b, a;
|
|
|
|
} UIRGBA;
|
|
|
|
|
|
|
|
#define UI_HEX_TO_COLOR_NORMAL(hex) ((((hex) & 0xFF0000) >> 16) / 255.0), ((((hex) & 0xFF00) >> 8) / 255.0), (((hex) & 0xFF) / 255.0)
|
|
|
|
#define UI_HEX_TO_RGBA(hex) (UIRGBA){UI_HEX_TO_COLOR_NORMAL(hex), 1.0}
|
|
|
|
|
2023-04-13 03:47:38 +03:00
|
|
|
#endif // _UI__COLOR_H
|