I think you would need to create a scalar array maybe. So you assign the result of the dot product of each cellnormal with your desired direction.
For calculating the normal vectors use vtkNormalsFilter.
I think for the coloring you would need to set a colortable somewhere, I’m not sure if in the mapper or on the actor and set it to read the scalar values
Hope it is helpful