From: Michael Tremer Date: Fri, 3 Oct 2025 10:24:42 +0000 (+0000) Subject: colors: Remove the prefix X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46888d6615b752fbee77f098f68575369a10fb46;p=collecty.git colors: Remove the prefix I suppose there will be no collisions in the namespace. Signed-off-by: Michael Tremer --- diff --git a/src/daemon/colors.h b/src/daemon/colors.h index 4749ce4..34c8adb 100644 --- a/src/daemon/colors.h +++ b/src/daemon/colors.h @@ -21,17 +21,17 @@ #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 diff --git a/src/daemon/graph.c b/src/daemon/graph.c index 77e99a7..110a0fc 100644 --- a/src/daemon/graph.c +++ b/src/daemon/graph.c @@ -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", diff --git a/src/daemon/graphs/loadavg.c b/src/daemon/graphs/loadavg.c index dbb92a5..eb5a8ab 100644 --- a/src/daemon/graphs/loadavg.c +++ b/src/daemon/graphs/loadavg.c @@ -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) {