#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} #endif // _UI__COLOR_H