From https://www.opengl.org/wiki/Type_Qualifier_(GLSL) :
Interpolation qualifiers
Certain inputs and outputs can use interpolation qualifiers. These are for any values which could be interpolated as a result of rasterization. These include:
- Vertex shader outputs
- Tessellation control shader inputs (to match with outputs from the
VS)
- Tessellation evaluation shader outputs
- Geometry shader inputs (to match with outputs from the TES/VS) and
outputs
- Fragment shader inputs
Interpolation qualifiers control how interpolation of values happens across a triangle or other primitive. There are three basic interpolation qualifiers.
flat
The value will not be interpolated. The value given to the fragment shader is the value from the Provoking Vertex for that primitive.
noperspective
The value will be linearly interpolated in window-space. This is usually not what you want, but it can have its uses.
smooth
The value will be interpolated in a perspective-correct fashion. This is the default if no qualifier is present.
Since smooth is the default one, OpenGL interpolates it for you. If you would not want the interpolation, you would define your color in your shaders with keyword flat, something like this:
flat vec3 color;