]> git.ipfire.org Git - collecty.git/commitdiff
graphs: Apply some more styling
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Oct 2025 18:25:44 +0000 (18:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Oct 2025 18:25:44 +0000 (18:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/colors.h
src/daemon/graph.c

index c4898bd5912f88d87b26a580e08146cf13fe2074..a04f8c3ced849a44fd242158cb0073c49ab34c71 100644 (file)
 #define COLOR_PINK                             "#e91e63"
 #define COLOR_DEEP_PURPLE              "#673ab7"
 
+// Make the background and canvas transparent
+#define COLOR_BACKGROUND               COLOR_WITH_ALPHA(COLOR_WHITE, COLOR_OPACITY_100P)
+#define COLOR_CANVAS                   COLOR_WITH_ALPHA(COLOR_WHITE, COLOR_OPACITY_100P)
+
+// Use a dark grey for the font
+#define COLOR_FONT                             "#333333"
+
+// Use a light grey for the axis, frame and grid
+#define COLOR_AXIS                             "#aaaaaa"
+#define COLOR_FRAME                            "#dddddd"
+#define COLOR_GRID                             "#eeeeee"
+
 /*
        Define some colours with a special meaning...
 */
index 3f1951b48b189755a65a8859977f5f255950e9ce..b1a8a15faa22002312cf49cd8f1a347fd23f640b 100644 (file)
@@ -53,7 +53,22 @@ const char* DEFAULT_RENDER_ARGS[] = {
        "--",
 
        // Change the background color
-       "--color=BACK" COLOR_WITH_ALPHA(COLOR_WHITE, COLOR_OPACITY_100P),
+       "--color=BACK" COLOR_BACKGROUND,
+
+       // Change the color of the canvas
+       "--color=CANVAS" COLOR_CANVAS,
+
+       // Set the font color
+       "--color=FONT" COLOR_FONT,
+
+       // Set the axis color
+       "--color=AXIS" COLOR_AXIS,
+
+       // Set the color of the frame
+       "--color=FRAME" COLOR_FRAME,
+
+       // Set the color of the grid
+       "--color=GRID" COLOR_GRID,
 
        // Disable the border around the image
        "--border=0",