Program which changes the color of a circle based on which key is pressed

I’m trying to write a Write a program which changes the color of a circle based on which key is pressed. Here are
the colors and their corresponding keys:
Nothing Pressed - Black
Y - Yellow
G - Green
R - Red
B - Blue
O - Orange
P - Purple

Are you asking for project guidance? I suggest you work off of the keyboard example and use the background() function to change the color.

Also look in reference at fill and ellipse()

That’s not really the purpose of the forum. It’s supposed to be meant to help people learn and collaborate. I’d be happy to recommend many great resources on how to learn how to use Processing or help you debug existing code. But if you’d just like someone to do the work for you then I suggest you hire someone.

1 Like

I give you a hint, with the code from the ‘I’ ‘E’ ‘F’, you can do the same thing, but with fill() and ellipse(). Just remember to write background(255)(white color) at the beginning of draw() to update the screen

1 Like

If you try to do it yourself and post the resulting code here we can help you achieve your goal. But no one is going to do it for you.