Created
November 11, 2014 16:23
-
-
Save nikola/aa82d6f9c224aa7dac29 to your computer and use it in GitHub Desktop.
Get Win32 Color Brush
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
def getColorBrush(red=0, green=0, blue=0): | |
class _COLORREF(ctypes.Structure): | |
_fields_ = [ | |
('byRed', ctypes.c_byte), | |
('byGreen', ctypes.c_byte), | |
('byBlue', ctypes.c_byte), | |
] | |
return ctypes.windll.gdi32.CreateSolidBrush(_COLORREF(red, green, blue)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment