diff --git a/codeworld-api.cabal b/codeworld-api.cabal
--- a/codeworld-api.cabal
+++ b/codeworld-api.cabal
@@ -1,5 +1,5 @@
 Name:                codeworld-api
-Version:             0.3
+Version:             0.3.1
 Synopsis:            Graphics library for CodeWorld
 License:             Apache
 License-file:        LICENSE
diff --git a/src/CodeWorld/CanvasM.hs b/src/CodeWorld/CanvasM.hs
--- a/src/CodeWorld/CanvasM.hs
+++ b/src/CodeWorld/CanvasM.hs
@@ -181,24 +181,10 @@
             , fromIntegral h)
     globalCompositeOperation op = Canvas.globalCompositeOperation op
     lineWidth w = Canvas.lineWidth w
-    strokeColor r g b a =
-        Canvas.strokeStyle
-            (pack
-                 (printf
-                      "rgba(%.0f,%.0f,%.0f,%f)"
-                      (r * 255)
-                      (g * 255)
-                      (b * 255)
-                      a))
-    fillColor r g b a =
-        Canvas.fillStyle
-            (pack
-                 (printf
-                      "rgba(%.0f,%.0f,%.0f,%f)"
-                      (r * 255)
-                      (g * 255)
-                      (b * 255)
-                      a))
+    strokeColor r g b a = Canvas.strokeStyle
+        (pack (printf "rgba(%d,%d,%d,%.2f)" r g b a))
+    fillColor r g b a = Canvas.fillStyle
+        (pack (printf "rgba(%d,%d,%d,%.2f)" r g b a))
     font t = Canvas.font t
     textCenter = Canvas.textAlign Canvas.CenterAnchor
     textMiddle = Canvas.textBaseline Canvas.MiddleBaseline
