code: def addCellScalars(self, scalars, name):
          
          poly = self.polydata(False)
          if isinstance(scalars, str):
              scalars = vtk_to_numpy(poly.GetPointData().GetArray(scalars))
  
          if len(scalars) != poly.GetNumberOfCells():
              colors.printc("~times Number of scalars != nr. of cells", c=1)
              exit()
          arr = numpy_to_vtk(np.ascontiguousarray(scalars), deep=True)
          arr.SetName(name)
          poly.GetCellData().AddArray(arr)
          poly.GetCellData().SetActiveScalars(name)
          self.mapper.SetScalarRange(np.min(scalars), np.max(scalars))
          self.mapper.ScalarVisibilityOn()
          return self
docs: Add cell scalars to the actor's polydata assigning it a name.