BitmapText color


I’m havng trouble getting the Color of BitmapText.

BitmapText getColor() doesn’t seem to work properly:


public void simpleInitApp() {


BitmapText textNode = new BitmapText(assetManager.loadFont(“Interface/Fonts/Default.fnt”), false);

ColorRGBA color = ColorRGBA.Red.clone();


System.out.println("Original color: " + color);

System.out.println("Returned color: " + textNode.getColor());



What version of JME are you running? There have been some fixes made to BitmapText since Alpha 4… specifically related to color. So if you aren’t already you should be using the nightly builds.

What is the output you get from the above test?


Original color: Color[1.0, 0.0, 0.0, 1.0]
Returned color: Color[1.0, 1.0, 1.0, 1.0]

Version: jME3_2011-06-30

Code from
[java] /**
* @return color of the text
public ColorRGBA getColor() {
return block.getColor();

* changes text color. all substring colors are deleted.
* @param color new color of text
public void setColor(ColorRGBA color) {
letters.invalidate(); // TODO: Don't have to align.
needRefresh = true;

Ok, I just fixed this in subversion.

I have it return the base color of the letters which should be right in most cases.