This gets the colour of the desktop
function get_colour()
local colour as dword
load dll "user32.dll",1
colour = call dll(1,"GetSysColor", 1)
delete dll 1
colour = rgb(rgbb(colour), rgbg(colour), rgbr(colour))
endfunction colour
You need to swap the order around as windows uses orders the colours in rgb while directx uses bgr.
Some values to pass to the GetSysColor function
COLOR_3DDKSHADOW 21
COLOR_3DFACE 15
COLOR_3DHILIGHT 20
COLOR_3DHIGHLIGHT 20
COLOR_3DLIGHT 22
COLOR_BTNHILIGHT 20
COLOR_3DSHADOW 16
COLOR_ACTIVEBORDER 10
COLOR_ACTIVECAPTION 2
COLOR_APPWORKSPACE 12
COLOR_BACKGROUND 1
COLOR_DESKTOP 1
COLOR_BTNFACE 15
COLOR_BTNHIGHLIGHT 20
COLOR_BTNSHADOW 16
COLOR_BTNTEXT 18
COLOR_CAPTIONTEXT 9
COLOR_GRAYTEXT 17
COLOR_HIGHLIGHT 13
COLOR_HIGHLIGHTTEXT 14
COLOR_INACTIVEBORDER 11
COLOR_INACTIVECAPTION 3
COLOR_INACTIVECAPTIONTEXT 19
COLOR_INFOBK 24
COLOR_INFOTEXT 23
COLOR_MENU 4
COLOR_MENUTEXT 7
COLOR_SCROLLBAR 0
COLOR_WINDOW 5
COLOR_WINDOWFRAME 6
COLOR_WINDOWTEXT 8
the default IDE sucks