code: def dump_color_array(dataset_dir, data_dir, color_array_info, root=None, compress=True):
      
      if root is None:
          root = {}
      root['pointData'] = {
          'vtkClass': 'vtkDataSetAttributes',
          "activeGlobalIds": -1,
          "activeNormals": -1,
          "activePedigreeIds": -1,
          "activeScalars": -1,
          "activeTCoords": -1,
          "activeTensors": -1,
          "activeVectors": -1,
          "arrays": []
      }
      root['cellData'] = {
          'vtkClass': 'vtkDataSetAttributes',
          "activeGlobalIds": -1,
          "activeNormals": -1,
          "activePedigreeIds": -1,
          "activeScalars": -1,
          "activeTCoords": -1,
          "activeTensors": -1,
          "activeVectors": -1,
          "arrays": []
      }
      root['fieldData'] = {
          'vtkClass': 'vtkDataSetAttributes',
          "activeGlobalIds": -1,
          "activeNormals": -1,
          "activePedigreeIds": -1,
          "activeScalars": -1,
          "activeTCoords": -1,
          "activeTensors": -1,
          "activeVectors": -1,
          "arrays": []
      }
  
      colorArray = color_array_info['colorArray']
      location = color_array_info['location']
  
      dumped_array = dump_data_array(dataset_dir, data_dir, colorArray, {}, compress)
  
      if dumped_array:
          root[location]['activeScalars'] = 0
          root[location]['arrays'].append({'data': dumped_array})
  
      return root
docs: Dump vtkjs color array