From 217e7d18dbaa260a15f5612d9670105b04cd455f Mon Sep 17 00:00:00 2001
From: A404M <ahmadmahmoudiprogrammer@gmail.com>
Date: Sat, 21 Dec 2024 21:47:19 +0330
Subject: Added ARGB colors

---
 src/ui/color.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/ui/color.h

(limited to 'src/ui/color.h')

diff --git a/src/ui/color.h b/src/ui/color.h
new file mode 100644
index 0000000..43005a6
--- /dev/null
+++ b/src/ui/color.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <stdint.h>
+
+typedef struct COLOR {
+  uint8_t b, g, r, a;
+} COLOR;
+
+#define color_hex(value) \
+  (uint8_t)((uint32_t)value >> 3), \
+  (uint8_t)((uint32_t)value >> 2), \
+  (uint8_t)((uint32_t)value >> 1), \
+  (uint8_t)((uint32_t)value >> 0) \
+
+constexpr COLOR COLOR_NO_COLOR = {
+    .a = 0,
+    .r = 0,
+    .g = 0,
+    .b = 0,
+};
+
+
+extern COLOR color_init(uint32_t value);
+
+extern bool color_equals(COLOR a,COLOR b);
+extern bool color_not_equals(COLOR a,COLOR b);
-- 
cgit v1.2.3