diff --git a/src/morphic.js b/src/morphic.js index cbfd6e4bc5..4ab12520d6 100644 --- a/src/morphic.js +++ b/src/morphic.js @@ -8,7 +8,7 @@ written by Jens Mönig jens@moenig.org - Copyright (C) 2010-2023 by Jens Mönig + Copyright (C) 2010-2024 by Jens Mönig This file is part of Snap!. @@ -1306,7 +1306,7 @@ /*jshint esversion: 11, bitwise: false*/ -var morphicVersion = '2023-November-07'; +var morphicVersion = '2024-January-22'; var modules = {}; // keep track of additional loaded modules var useBlurredShadows = true; @@ -2130,8 +2130,8 @@ Color.prototype.toRGBstring = function () { Color.fromString = function (aString) { // I parse rgb/rgba strings into a Color object - var components = aString.split(/[\(),]/).slice(1,5); - return new Color(components[0], components[1], components[2], components[3]); + var channels = aString.split(/[\(),]/).slice(0,4); + return new Color(+channels[0], +channels[1], +channels[2], +channels[3]); }; // Color copying: