[SOLVED] ColorRGBA constructor not working?

I’m trying to set the color for a box, but when I execute this code

Node player=new Node();
Box b = new Box(.15f,.5f,.25f);
Geometry torso = new Geometry(“Torso”,b);
torso.setLocalTranslation(new Vector3f(0,0,0));
Material mat = new Material(a,“Common/MatDefs/Misc/Unshaded.j3md”);
ColorRGBA jimbo = new ColorRGBA(29,154,29,1.0f);
mat.setColor(“Color”,jimbo);
torso.setMaterial(mat);
player.attachChild(torso);
return player;

When I render this in a simple application, it appears to be white. If I use, say, ColorRGBA.Green instead of jimbo, it turns out green. Please help!

Consider: what does red=29 mean?

http://javadoc.jmonkeyengine.org/com/jme3/math/ColorRGBA.html#ColorRGBA-float-float-float-float-

It’s a float… so what do you suppose 29 means in that context? Hint: you’ve already set alpha to 1.0 instead of 262435 or some other large number… so on some level you probably already know what these parameters should be.

Thanks a heap! That got me thinking and I realized to divide the RGB values by 255f and it worked like a charm when I used setAsRGB!