code: function getNodeColor(node, seriesModel, ecModel) {
      // Color from visualMap
      var visualColor = node.getVisual('color');
      var visualMetaList = node.getVisual('visualMeta');
      if (!visualMetaList || visualMetaList.length === 0) {
          // Use first-generation color if has no visualMap
          visualColor = null;
      }
  
      // Self color or level color
      var color = node.getModel('itemStyle').get('color');
      if (color) {
          return color;
      }
      else if (visualColor) {
          // Color mapping
          return visualColor;
      }
      else if (node.depth === 0) {
          // Virtual root node
          return ecModel.option.color[0];
      }
      else {
          // First-generation color
          var length = ecModel.option.color.length;
          color = ecModel.option.color[getRootId(node) % length];
      }
      return color;
  }
docs: Get node color
  
  @param {TreeNode} node the node to get color
  @param {module:echarts/model/Series} seriesModel series
  @param {module:echarts/model/Global} ecModel echarts defaults