I saw this post Multi-colored text in libgdx but it's not useful specially in new API.
For example: I want to color "libGDX" text like this:
BitmapFont font = new BitmapFont(Gdx.files.internal("fonts/CarterOne.fnt"));
LabelStyle style = new LabelStyle(font, null);
Label label = new Label("libGDX", style);
stage.addActor(label);
How can I do this ?
You can do this easily with the color markup language that Label
supports as well.
Make sure to read that article completely, as there are a few little obstacles involved to get it working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With