summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/color.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index 479e4ba..ecf7005 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -27,14 +27,20 @@
/** A color value. */
typedef struct {
- double R; /**< sRGB red value. */
- double G; /**< sRGB green value. */
- double B; /**< sRGB blue value. */
+ double R; /**< Red. */
+ double G; /**< Green. */
+ double B; /**< Blue. */
double trans; /**< Transparency. */
double filter; /**< Degree of filtering. */
} dmnsn_color;
+/** A standard format string for colors. */
+#define DMNSN_COLOR_FORMAT \
+ "<red = %g, green = %g, blue = %g, trans = %g, filter = %g>"
+/** The appropriate arguements to printf() a color. */
+#define DMNSN_COLOR_PRINTF(c) (c).R, (c).G, (c).B, (c).trans, (c).filter
+
/* Standard colors */
extern const dmnsn_color dmnsn_black; /**< Black. */
extern const dmnsn_color dmnsn_white; /**< White. */