From 829e878243cdaea70ea4a72c48be9f22b2020687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 24 Nov 2013 00:02:13 +0100 Subject: [PATCH] Add failing test for creating colors from RGBA. --- test/tests/Color.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/tests/Color.js b/test/tests/Color.js index 61b9039c..41bbe34f 100644 --- a/test/tests/Color.js +++ b/test/tests/Color.js @@ -55,6 +55,12 @@ test('Creating Colors', function() { compareColors(new Color('#ff0000'), new Color(1, 0, 0), 'Color from hex code'); + compareColors(new Color('rgb(255, 0, 0)'), new Color(1, 0, 0), + 'Color from RGB code'); + + compareColors(new Color('rgba(255, 0, 0, 0.5)'), new Color(1, 0, 0, 0.5), + 'Color from RGBA code'); + compareColors(new Color({ red: 1, green: 0, blue: 1}), new Color(1, 0, 1), 'Color from rgb object literal');