diff --git a/src/color.class.js b/src/color.class.js index c1346310ed5..121a261e185 100644 --- a/src/color.class.js +++ b/src/color.class.js @@ -288,7 +288,7 @@ * @field * @memberOf fabric.Color */ - fabric.Color.reHSLa = /^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i; + fabric.Color.reHSLa = /^hsla?\(\s*(\d{1,3}(?:\.\d+)?)\s*,\s*(\d{1,3}(?:\.\d+)?\%)\s*,\s*(\d{1,3}(?:\.\d+)?\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i; /** * Regex matching color in HEX format (ex: #FF5544CC, #FF5555, 010155, aff)