OpenGL - Colours not working properly
Your attribute locations could be wrong, because you're not querying them:

glVertexAttribPointer(0, 3, GL_FLOAT, false, 7*4, 0);
glVertexAttribPointer(3, 4, GL_FLOAT, false, 7*4, 3*4);


The first parameter should be queried using glGetAttribLocation:

glVertexAttribPointer(glGetAttribLocation( program, "position" ), 3, GL_FLOAT, false, 7*4, 0);
glVertexAttribPointer(glGetAttribLocation( program, "i_color" ), 4, GL_FLOAT, false, 7*4, 3*4);


If using more modern OpenGL, the locations can be set manually in the shader, eliminating the need for glGetAttribLocation:

layout(location=0) in vec3 position;
layout(location=3) in vec4 i_color;