rendering a triangle has no color I wrote a program to render a simple triangle with colors, the triangle is there but there's no color.
GLfloat vertices[] = {
        0.6f,0.4f , 0.3f,0.5f, 0.1f,0.3f, 0.8f,0.2f, 0.1f,-0.4f, 0.9f,0.3f
    };


    unsigned int program;
    if (!loadShader(program))
        return -1;

    unsigned int VAO;
    glGenVertexArrays(1, &amp;VAO);
    
    unsigned int buffer;
    /* GENERATE THE BUFFER (1 BUUFER) */
    glGenBuffers(1, &amp;buffer);
    glBindVertexArray(VAO);
    /* SELECT THAT BUFFER TO WORK WITH */
    glBindBuffer(GL_ARRAY_BUFFER, buffer);

    //glBufferData(GL_ARRAY_BUFFER, RealPositions.size()*sizeof(float), RealPositions.data(), GL_STATIC_DRAW);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);

    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)0);
    glEnableVertexAttribArray(0);
    glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(2 * sizeof(float)));
    glEnableVertexAttribArray(1);

   

    glBindVertexArray(0);
    /* Loop until the user closes the window */
    while (!glfwWindowShouldClose(window))
    {
        /* Render here */
        glClear(GL_COLOR_BUFFER_BIT);

        
        glUseProgram(program);

    
        glBindVertexArray(VAO);
        glDrawArrays(GL_TRIANGLES, 0, 3);

        /* Swap front and back buffers */
        glfwSwapBuffers(window);

        /* Poll for and process events */
        glfwPollEvents();
}


and this the vertex shader:
#version 440


layout (location = 0) in vec3 vertices;
layout (location = 1) in vec3 vertex_color;
out vec3 vs_color;
void main()
{
    gl_Position=vec4(vertices, 1.f);
    vs_color=vertex_color;
}

and this is the fragment shader:
#version 440 core  


in vec4 vs_pos;
in vec3 vs_color;
out vec4 fs_color;


void main()
{
    fs_color=vec4(vs_color, 1.f);
}

what am i doing wrong?
Your inputs and outputs still don't line up.
#version 440 core  

// Comment out the line below
// in vec4 vs_pos;    &lt;----- No corresponding output in the vertex shader
in vec3 vs_color; 

out vec4 fs_color;


void main()
{
    fs_color=vec4(vs_color, 1.f);
}

The gl_Position output is consumed and does not need a specific input in the fragment shader. Only variable declared as &quot;out&quot; in the vertex shader need a corresponding &quot;in&quot;.
The next issue is the vertices need to have colors in them. The way it is setup now all the components are consumed before even a single triangle is drawn.
The vertex buffer needs to be setup:
vertex,color, vertex,color, vertex,color
where each vertex and color has 3 floating point values.
GLfloat vertices[] = {

//    vertex           color
-0.5f, -0.5f, 0.0f,  1.0f,0.0f,0.0f
 0.5f, -0.5f, 0.0f,  0.0f,1.0f,0.0f
 0.0f,  0.5f, 0.0f,  0.0f,0.0f,1.0f 
};

Something like the above. Is what you need for the vertices.