Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get Win32 Color Brush
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
You can’t perform that action at this time.