mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-26 00:14:42 +00:00
Allows rgba() colors to have decimals, i.e. rgba(45.2342%, 88.2342%, 83.5%)
This commit is contained in:
parent
53aa98ea2d
commit
11a21f10ee
1 changed files with 1 additions and 1 deletions
|
|
@ -256,7 +256,7 @@
|
|||
* @field
|
||||
* @memberOf fabric.Color
|
||||
*/
|
||||
fabric.Color.reRGBa = /^rgba?\(\s*(\d{1,3}\%?)\s*,\s*(\d{1,3}\%?)\s*,\s*(\d{1,3}\%?)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/;
|
||||
fabric.Color.reRGBa = /^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/;
|
||||
|
||||
/**
|
||||
* Regex matching color in HSL or HSLA formats (ex: hsl(200, 80%, 10%), hsla(300, 50%, 80%, 0.5), hsla( 300 , 50% , 80% , 0.5 ))
|
||||
|
|
|
|||
Loading…
Reference in a new issue