(gradient, colors, currentTheme)
| 278 | } |
| 279 | |
| 280 | function parseGradient(gradient, colors, currentTheme) { |
| 281 | return gradient.replace(/([a-z]+(\s[a-z]+-[1-5])?)(?=$|,)/gi, function (x) { |
| 282 | return classToHex(x, colors, currentTheme) || x; |
| 283 | }).replace(/(rgba\()#[0-9a-f]+(?=,)/gi, function (x) { |
| 284 | return 'rgba(' + Object.values(HexToRGBA(parseHex(x.replace(/rgba\(/, '')))).slice(0, 3).join(','); |
| 285 | }); |
| 286 | } |
| 287 | |
| 288 | function RGBtoInt(rgba) { |
| 289 | return (rgba.r << 16) + (rgba.g << 8) + rgba.b; |
nothing calls this directly
no test coverage detected