# How to change colors of texture in lwjgl? [duplicate]

I have the following texture:

The black pixels are characters, the background is transparent. How do I change the black pixels of the characters to another color? I use this texture as a bitmap for text rendering in lwjgl. For example, is there a way to change the black pixels to red? I looked to shaders, but I don't know how to use shaders and what they does. I would appreciate an example. I also looked at this page.

But I don't really understand how to do it. I will really vote up your answer.

What you're asking is probably possible, but I think the easiest thing to do would be to just make another texture with the desired effects. Then, when the time comes to modify the text, just switch the texture. This can be modeled with:

void update()
{
// do updating stuff above
if (condition)
{
textTexture = // Get texture here
}
}

void draw()
{
textTexture.bind()