const TRANSPARENT_BACKGROUND = /rgba\(\d+, \d+, \d+, 0\)/i;  // rgba(0, 0, 0, 0)

export function getBackgroundColor(element) {
  // find DOM node with background color
  let el = element;
  while (el.style) {
    const backgroundColor = window.getComputedStyle(el).backgroundColor;
    if (backgroundColor.search(TRANSPARENT_BACKGROUND) === -1) {
      return backgroundColor;
    }
    el = el.parentNode;
  }
  return 'white';
}

@@ -25,16 +25,18 @@
 OUND = /
+%5E(
 rgba%5C(%5Cd
@@ -51,16 +51,30 @@
 %5Cd+, 0%5C)
+%7Ctransparent)$
 /i;  // 

add 'transparent' for FireFox