I am trying to represent the RGB color model using python + pygame. I wanted to get the following: So then, I wrote the following code: But instead of getting the RGB color model, I got this, with colors incorrectly blended: Does anybody know what it could be? Thanks! Answer This should work: You want to add the colors at
Tag: pygame2
Line is detected as diagonal of rectangle while using collidepoint function in pygame
I am working on a graph based project. I am drawing lines to represent the edges. My goal is to change color of line when I click on the specific line. the problem is pygame treats line as diagonal of virtual rectangle. so when even if I don’t click on the line but the mouse position is in the projected