You can take uniform variable in fragment shader and assign that to gl_Fragcolor. Now in your draw function loop, change your local variable as per your color requirement and assign value of this local variable to uniform variable.
The interpolated positional vertex data is not available in the pixel shader for OpenGL ES 2.0, as you discovered.
One solution is to use the texture coordinates instead because they are available in the pixel/fragment shader in interpolated form. This is what is normally used to sample textures, such as gsvTexCoord in this example: