As far as I can remember the recoloring aka HUE modification works only for color images. Your icon is nearly a b/w image.
In this case you can do something like this here:
#include <GDIPlus.au3>
#include <WinAPISysWin.au3>
#include <WinAPIShellEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example_1()
Func _SetBkIcon($ControlID, $iForeground_old, $iForeground_new, $iBackground, $sIcon, $iIndex, $iWidth, $iHeight)
Local Static $STM_SETIMAGE = 0x0172
Local $hBitmap, $hImage, $hIcon, $hBkIcon, $hGfx
$hIcon = _WinAPI_ShellExtractIcon($sIcon, $iIndex, $iWidth, $iHeight)
$hImage = _GDIPlus_BitmapCreateFromHICON($hIcon)
Local $aRemapTable[2][2]
$aRemapTable[0][0] = 1
$aRemapTable[1][0] = $iForeground_old
$aRemapTable[1][1] = $iForeground_new
Local $hImgAttr = _GDIPlus_ImageAttributesCreate()
_GDIPlus_ImageAttributesSetRemapTable($hImgAttr, $aRemapTable)
Local $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage)
$hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
$hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsClear($hGfx, $iBackground)
_GDIPlus_GraphicsDrawImageRectRect($hGfx, $hImage, 0, 0, $iW, $iH, 0, 0, $iW, $iH, $hImgAttr)
$hBkIcon = _GDIPlus_HICONCreateFromBitmap($hBitmap)
GUICtrlSendMsg($ControlID, $STM_SETIMAGE, $IMAGE_ICON, _WinAPI_CopyIcon($hBkIcon))
_WinAPI_RedrawWindow(GUICtrlGetHandle($ControlID))
_WinAPI_DeleteObject($hIcon)
_WinAPI_DeleteObject($hBkIcon)
_GDIPlus_GraphicsDispose($hGfx)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ImageDispose($hBitmap)
_GDIPlus_ImageAttributesDispose($hImgAttr)
Return SetError(0, 0, 1)
EndFunc ;==>_SetBkIcon
Func Example_1()
Local $hGui = GUICreate("GDI+", 200, 50)
GUISetState(@SW_SHOW)
_GDIPlus_Startup()
GUICtrlCreateIcon("", -1, 10, 10, 32, 32)
_SetBkIcon(-1, 0xFF000000, 0xFFFFFFFF, 0xFF000000, @ScriptDir & "\git.ico", -1, 32, 32)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete($hGui)
EndFunc ;==>Example_1
It will change the foreground color from black to white and set the background color to black.