Coloring a vtkUnstructuredGrid by vector magnitude

hello, i’m trying to Coloring a vtkUnstructuredGrid by vector magnitude

The value I want to use for coloring is “VECTORS solution double” value in the file below.
I want to color my vtkUnstructuredGrid using its magnitude.
beam_test.vtk (573.5 KB)

If I look at paraview, it looks like this:

I’m going to implement this using vtk.
I found a helpful link, but I couldn’t understand it because there was no example code.
Is there a detailed example code?

Hi @hye00525

Here is a VTK example for this usecase: https://kitware.github.io/vtk-examples/site/Cxx/Graphs/ColorVerticesLookupTable/