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?

http://www.mikeash.com/getting_answers.html

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));

board.setMaterial(carrom_mat);





this rbg combination is for pale yellow.

http://www.colorschemer.com/online.html



but what i got is a whitish color.

http://imgur.com/EUDvB



Manish

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.



http://hub.jmonkeyengine.org/javadoc/com/jme3/math/ColorRGBA.html



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.