From 6de0a1ae6ec6b9c07fd88089a4801b28f2dfa968 Mon Sep 17 00:00:00 2001 From: Ross Johnson <159597299+rosco54@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:50:40 +1100 Subject: [PATCH] Issue #4742: apply config opacity to RGB colors. --- src/modules/Fill.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/Fill.js b/src/modules/Fill.js index 4348eb8fc..d5c5f125a 100644 --- a/src/modules/Fill.js +++ b/src/modules/Fill.js @@ -150,6 +150,9 @@ class Fill { } else { if (fillColor.indexOf('rgba') > -1) { fillOpacity = Utils.getOpacityFromRGBA(fillColor) + } else { + // if rgb color, apply opacity + defaultColor = Utils.hexToRgba(Utils.rgb2hex(fillColor), fillOpacity) } } if (opts.opacity) fillOpacity = opts.opacity