Ok, so what about the problem with the colors...
The textout function seems to give the right colors (at least what I checked). But the others, line, rect, pixel, etc, all seem to mess up the colors.
I've even tried to use getpixel to try to see what could be going on, but it seems to get messed up as well.
Example, I set color as (255,0,0) which should be pure RED.
I draw text, and get red, I draw everything else and get a shade of GREEN.
If I set the color to (0,255,0) - pure green, the text is green and everthing else is RED.
With (0,0,255) I get blue text and everything else black.