Pixel color filter

I would like to play around with pixel values.
What is the best way to apply a color filter over a pixel array?


int color = pixels[x + y * width] | 0xFFFFFF00;

This is how I think it would work. But I guess I’m wrong…

What are you doing this in? Java2D? LWJGL? JOGL? Something else?

Can you post an MCVE that demonstrates what you’ve tried? You’ve posted an approach, what happened when you tried to implement it?

What exactly do you mean when you say “I guess I’m wrong”? Are you seeing an error? Some kind of unexpected behavior? Something else?