How can I add (red, green, blue) values to my Java? For example:
setColor(255, 0, 0);
The context looks like this:
public void render() {
BufferStrategy bs = getBufferStrategy();
if (bs == null) {
createBufferStrategy(3);
return;
}
Graphics g = bs.getDrawGraphics();
g.setColor(); // <-- This line
g.fillRect(0, 0, getWidth(), getHeight());
g.dispose();
bs.show();
}
I want to give my rectangle a color using RGB values like (200, 200, 200) for example; that'll be like a gray.