[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Partially Transparent Color-Dynamic Rectangles



On 10/14/07, Luke Paireepinart <rabidpoobear@xxxxxxxxx> wrote:
Ian Mallett wrote:
> Yes, but then everything behind it is brighter when it shouldn't be...
What do you mean by this? 
When you have an opaque bar of a solid color ("pygame.draw.rect(surface, (255,0,0), (rect), 1)") then it looks red.  If you put it over a black background, the pixels look darker.  If I compensate by making all the pixels there somewhat lighter, lighter colored objects, such as asteroids will look wrong.  Anyway, after I looked at the somewhat darker rectangle for a while, it began looking right.  It was just a change from the (255,0,0) bar to something like (150,0,0), which is how it should be.
The color you're using is a brighter color, so if you're alpha blending
it then it'll make everything you're blending that's darker than it
brighter.
>   the solution is to use a more neutral background.
Do you mean a brighter background?
Yes.

Ian