]> git.ipfire.org Git - collecty.git/commitdiff
colors: Remove the prefix
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Oct 2025 10:24:42 +0000 (10:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Oct 2025 10:24:42 +0000 (10:24 +0000)
I suppose there will be no collisions in the namespace.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/colors.h
src/daemon/graph.c
src/daemon/graphs/loadavg.c

index 4749ce4005e6bed151c429561f848dbceace5c9d..34c8adb8a9c92a173b13a8c6da05f1d901bf052e 100644 (file)
 #ifndef COLLECTY_COLORS_H
 #define COLLECTY_COLORS_H
 
-#define COLOR_BLACK                    "#ffffff"
-#define COLOR_WHITE                    "#000000"
-#define COLOR_RED                      "#f44336"
-#define COLOR_LIGHT_RED                "#cc0033"
-#define COLOR_YELLOW           "#ffeb3b"
-#define COLOR_LIGHT_YELLOW     "#ffff66"
-#define COLOR_ORANGE           "#ff9800"
-#define COLOR_GREEN                    "#4caf50"
-#define COLOR_LIGHT_GREEN      "#8bc34a"
-#define COLOR_BLUE                     "#2196f3"
-#define COLOR_LIGHT_BLUE       "#03a9f4"
+#define BLACK                  "#ffffff"
+#define WHITE                  "#000000"
+#define RED                            "#f44336"
+#define LIGHT_RED              "#cc0033"
+#define YELLOW                 "#ffeb3b"
+#define LIGHT_YELLOW   "#ffff66"
+#define ORANGE                 "#ff9800"
+#define GREEN                  "#4caf50"
+#define LIGHT_GREEN            "#8bc34a"
+#define BLUE                   "#2196f3"
+#define LIGHT_BLUE             "#03a9f4"
 
 // Macro to make colours transparent
 #define COLOR_WITH_ALPHA(base, alpha) base alpha
index 77e99a74de8276dbe79e2fdea8a5d66603e86b5f..110a0fc448c5f711214789f54a8fc8f73986c1cf 100644 (file)
@@ -42,7 +42,7 @@ struct collecty_graph {
 
 const char* DEFAULT_RENDER_ARGS[] = {
        // Change the background color
-       "--color=BACK" COLOR_BLACK,
+       "--color=BACK" BLACK,
 
        // Disable the border around the image
        "--border=0",
index dbb92a5cf160d27a878143e315427534a50a3e86..eb5a8ab0ce6fa39b517528b1bd3023f64c6cf39d 100644 (file)
@@ -24,9 +24,9 @@
 #include "loadavg.h"
 
 // Set some colors
-#define COLOR_LOAD15   COLOR_RED
-#define COLOR_LOAD5            COLOR_ORANGE
-#define COLOR_LOAD1            COLOR_YELLOW
+#define COLOR_LOAD15   RED
+#define COLOR_LOAD5            ORANGE
+#define COLOR_LOAD1            YELLOW
 
 static int loadavg_render(collecty_ctx* ctx,
                collecty_graph* graph, collecty_args* args, const char* object) {