Not sure what you are asking help for, but this may help you. It calculates the contrast between 2 colors, and if it larger than 7:1, it is considered as a high contrast. (based on W3C)
#include <GUIConstants.au3>
#include <Constants.au3>
#include <Color.au3>
; see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-procedure
Local $c1 = 0xFFFF80
Local $c2 = 0x000000
GUICreate("Calculate color Contrast", 550, 400)
GUICtrlCreateLabel("", 50, 50, 200, 200)
GUICtrlSetBkColor(-1, $c1)
GUICtrlCreateLabel("", 300, 50, 200, 200)
GUICtrlSetBkColor(-1, $c2)
Local $iContrast = ColorContrast($c1, $c2)
GUICtrlCreateLabel(Round($iContrast, 3), 225, 280, 100, 30, $SS_CENTERIMAGE+$SS_CENTER)
GUICtrlSetFont(-1, 20)
GUICtrlCreateLabel(($iContrast >= 7 ? "High" : "Low") & " Contrast", 10, 320, 530, 35, $SS_CENTERIMAGE+$SS_CENTER)
GUICtrlSetFont(-1, 24)
GUISetState()
While True
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
Func ColorContrast($iC1, $iC2)
Local $iL1 = RelativeLuminescence($iC1)
Local $iL2 = RelativeLuminescence($iC2)
Return $iL1 > $iL2 ? ($iL1+0.05)/($iL2+0.05) : ($iL2+0.05)/($iL1+0.05)
EndFunc
Func RelativeLuminescence($iColor)
Local $aCol = _ColorGetRGB($iColor)
Local $R = $aCol[0]/255, $G = $aCol[1]/255, $B = $aCol[2]/255
$R = $R <= 0.03928 ? $R /12.92 : (($R + 0.055)/1.055) ^ 2.4
$G = $G <= 0.03928 ? $G /12.92 : (($G + 0.055)/1.055) ^ 2.4
$B = $B <= 0.03928 ? $B /12.92 : (($B + 0.055)/1.055) ^ 2.4
Return 0.2126 * $R + 0.7152 * $G + 0.0722 * $B
EndFunc