docs: function findBackgroundColor(element) {
    if (element == null || element instanceof Document) {
      // This element has no background, assume white.
      return 'rgb(255,255,255)';
    }
    // @ts-ignore
    if (element instanceof ShadowRoot) {
      return findBackgroundColor(element.host);
    }
    const backgroundColor = getComputedStyle(element).backgroundColor;
    if (backgroundColor === 'transparent' || backgroundColor === 'rgba(0, 0, 0, 0)') {
      const parent = element.assignedSlot || element.parentNode || element.host;
      return findBackgroundColor(parent);
    } else {
      return backgroundColor;
    }
  }