Skip to content

Commit 37e0027

Browse files
shape image svg / support opacity
1 parent e86e097 commit 37e0027

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

particles.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,10 @@ function launchParticlesJS(tag_id, params){
330330
var svgXml = data.currentTarget.response,
331331
rgbHex = /#([0-9A-F]{3,6})/gi,
332332
coloredSvgXml = svgXml.replace(rgbHex, function (m, r, g, b) {
333-
return 'rgb(' + t.color.r + ','
333+
return 'rgba(' + t.color.r + ','
334334
+ t.color.g + ','
335-
+ t.color.b + ')';
335+
+ t.color.b + ','
336+
+ t.opacity + ')'
336337
});
337338

338339
var svg = new Blob([coloredSvgXml], {type: 'image/svg+xml;charset=utf-8'}),

0 commit comments

Comments
 (0)