@ApiStatus.Internal
  public static @Nullable Color getBackground(@NotNull JTree tree, @NotNull TreePath path, int row, boolean selected) {
    // to be consistent with com.intellij.ui.components.WideSelectionListUI#getBackground
    if (selected) {
      return RenderingUtil.getSelectionBackground(tree);
    }
    if (row == TreeHoverListener.getHoveredRow(tree)) {
      Color background = RenderingUtil.getHoverBackground(tree);
      if (background != null) return background;
    }
    Object node = TreeUtil.getLastUserObject(path);
    if (node instanceof ColoredItem) {
      Color background = ((ColoredItem)node).getColor();
      if (background != null) return background;
    }
    if (node instanceof BackgroundSupplier supplier) {
      Color background = supplier.getElementBackground(row);
      if (background != null) return background;
    }
    if (tree instanceof TreePathBackgroundSupplier supplier) {
      Color background = supplier.getPathBackground(path, row);
      if (background != null) return background;
    }
    return null;
  }
@ApiStatus.Internal
  public static @Nullable Color getBackground(@NotNull JTree tree, @NotNull TreePath path, int row, boolean selected)