This site requires JavaScript, please enable it in your browser!
Greenfoot back
Entity1037
Entity1037 wrote ...

2014/5/4

How to add color values to an existing color?

Entity1037 Entity1037

2014/5/4

#
So I need to set the color at coordinate (x,y) on this image to be the color that's there now, plus the rgb values (0,40,0). I'm not sure how you're suppose to do that... Could someone please help?
Zamoht Zamoht

2014/5/4

#
Something like this I believe. Color color = image.getColorAt(x,y); Color newColor = new Color(color.getRed(), color.getGreen()+40, color.getBlue()); image.setColorAt(x,y,newColor);
You need to login to post a reply.