RGB combinations

hi…i m taking rgb combinations from net to impart colors of my choice to materials…but result is not as expected.

m i supposed to do something else too?

Screenshots… test case… anything that can be of use?


my code for setting color is as:

board_shape = new Box(Vector3f.ZERO, 1, .05f, 1);

board=new Geometry(“Board”,board_shape);

Material carrom_mat = new Material(assetManager,“Common/MatDefs/Misc/Unshaded.j3md”);

carrom_mat.setColor(“Color”,new ColorRGBA(255f,255f,153f,0));


this rbg combination is for pale yellow.


but what i got is a whitish color.



ColorRGBA takes float values from 0 to 1, divide all your values by 255 and it should work

got it…thanks a lot.

Also, never be afraid to read the javadocs. Some of them are quite good.


Which right at the top says:

ColorRGBA defines a color made from a collection of red, green and blue values. An alpha value determines is transparency. All values must be between 0 and 1.