code: function findBackgroundColor(element) {
    if (element == null || typeof element.style === 'undefined') {
      // This element has no background, assume white.
      return 'rgb(255,255,255)';
    }
    const backgroundColor = getComputedStyle(element).backgroundColor;
    if (backgroundColor === 'transparent' || backgroundColor === 'rgba(0, 0, 0, 0)') {
      return findBackgroundColor(element.parentNode);
    } else {
      return backgroundColor;
    }
  }
docs: Return the background color of the given element. If the color is "transparent" (the default in Mozilla and IE) or "rgba(0, 0, 0, 0)" (the default transparent value in Blink and Webkit), walk up the parent chain until a non-transparent color is found.