aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--color.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/color.go b/color.go
new file mode 100644
index 0000000..ee81855
--- /dev/null
+++ b/color.go
@@ -0,0 +1,9 @@
+package main
+
+type Color struct {
+ r, g, b float64
+}
+
+func (color Color) ToPixel() Pixel {
+ return Pixel{int(color.r * 255), int(color.g * 255), int(color.b * 255)}
+}