Within the frame of a chess applet, I have a few sets of such greyscale/black & white (not sure) :
Is there any way to give a color tint to a PNG picture via Java Code ? Tried to google the matter and didn't find anything really matching what I'm looking for.
For the following piece for example, I'd like to give it white/yellow tint for the White player, and a flavour of black for the Black player. The idea of setting the color dynamically is to tweak themes at runtime.
It would be a lot simpler to give your program translucent images (PNG) which are plain coloured (plain or gradient) in the colours you want, and have a certain % of transparency (you can do that in photoshop/illustrator in 1min).
Then programmatically merge the tint image (preserving transparency) with the other image underneath.
Check this SO post for how to merge two images: Merging two images
I found this on StackOverflow. It's pretty good explanation, so I won't bore you with any additional details :) Hope that helps: Applying a tint to an image in java