[SOLVED] Vertex coloring does not work when using Lighting.j3md, but does work with Unshaded.j3md

Hello! I am having some problems with this particular problem.

EDIT: I noticed changing the color of the PointLight changes the color displayed on the model. Maybe this plays a role?

I am working on a system to generate models. Obviousely this requires lighting and stuff like that. An important thing is adding colors without having to use custom textures or anything like that. I am working on a simple game that requires no textures at all. Models are existing out of cubes solely. The cube rendering and generation works just fine, but when I try to color them something goes wrong. I get no errors, but the colors I assign in the Type.Color mesh buffer seem to be ignored when using Lighting.j3md, the diffuse color seems to be taken over. When using Unshaded.j3md it seems to be working just fine. The colors are assigned like this:

float r = (float) current.getR()/255;
float g = (float) current.getG()/255;
float b = (float) current.getB()/255;
float a = (float) current.getA()/255;

The model is added like this:

Geometry geom = new Geometry("Custom Mesh", sword.getMesh());
        boolean shading = true;
        Material mat;
            mat = new Material(assetManager,
            mat.setBoolean("UseMaterialColors", true);
            mat.setColor("Diffuse", ColorRGBA.White );
            mat.setColor("Ambient", ColorRGBA.White );
            mat = new Material(assetManager, 

Here’s a screenshot:

Due to me being a new user I cannot upload an image with the shaders, but with shaders the whole model is gray.

Please note that I have no clear understanding of how the different lighting color values mean, so I would pretty much appreciate any explanation if that is what I have done wrong.

Kind regards and thank you in advance,

Problem solved! Turns out that it was just a matter of adding a boolean. After inspecting Lighting.j3md I figured out there’s a boolean that I missed in the documentation:

mat.setBoolean("UseVertexColor", true);

Thank you guys if you spent time reading this and everything!