diff doodle/tk/color.d @ 76:78bc2046256e

And some more
author "David Bryant <bagnose@gmail.com>"
date Sun, 15 Aug 2010 01:21:14 +0930
parents
children 535bae7a7305
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doodle/tk/color.d	Sun Aug 15 01:21:14 2010 +0930
@@ -0,0 +1,20 @@
+module doodle.tk.color;
+
+struct Color {
+    static immutable Color DEFAULT = Color(0.0, 0.0, 0.0, 1.0);
+
+    this(in double r, in double g, in double b, in double a) {
+        // XXX how to deal with out of range? Clamp/assert
+        _r = r;
+        _g = g;
+        _b = b;
+        _a = a;
+    }
+
+    // TODO
+    // hsv, grey, etc.
+
+    private {
+        double _r, _g, _b, _a;
+    }
+}