On your screenshots we can see that you're using smooth shading on your object:
The way smooth shading works is that it calculates color1 for each vertex, and then interpolates between them on the surface (your color is a weighted average of all vertices, with the weights being the inverse of the distance to those vertices - the closer you are to a vertex, the more similar you are to the color calculated for this vertex).
If all vertices have the same normals, they all generate the same color, and so the average color between them will be the same, regardless of weights (distance):
But if I change the normals of the pair of vertices on the right, I will get a gradient going from one pair of vertices to the other:
Just to make it super clear, if I change the left pair of vertices to the same normals as the right pair, I will again have a "flat" plane, because again all vertex normals again point in the same direction:
You can probably see how the plane on the first of my screenshots was flat light gray, on the third of my screenshots was flat dark gray, and on the middle screenshot was a gradient between those two colors.
You may also wonder: how did I modify the vertex normals - it's simple, I just added two faces and then hid them:
Since a vertex normal is an average of normals of all faces built on this vertex, you can add faces like this to control vertex normals. It's a useful trick, but also a root cause of your problem: even though your faces are flat, they are connected to other faces that have different surface normals.
So how do you remove the gradient on my 2nd screenshot? Of course the most obvious solution is to remove the face, but let's say you actually want that face to be there and to be visible - you can then just disconnect that face (select and Y)
For a non-destructive workflow, you can mark the edge sharp, and then use an Edge Split modifier:
In many cases you don't even need to mark the edge Sharp and you can make the modifier split faces automatically if there's a significant (angle above threshold) crease/edge:
This modifier modifies the topology and affects modifiers down the stack - e.g. if I add a Subdivision Surface modifier below Split Edges, and disable/enable the Split Edges:
Usually instead of using the modifier you want to use Split Normals:
Running the s.s. test with alternating Auto Smooth:
Since you already have edges marked sharp, you probably only need to add the Split Edges modifier or to enable Auto Smooth:
1 - slight simplification, you don't calculate color directly but values from which the material later calculates color.