What about this?
;Coded by UEZ build 2023-10-30
ConsoleWrite(Hex(RGB(255,0,0)) & @CRLF)
ConsoleWrite(Hex(ARGB(128,80,120,240)) & @CRLF)
Func RGB($r, $g, $b)
Return BitOR(BitShift(Max(0, Min(255, $r)), -16), BitShift(Max(0, Min(255, $g)), -8), Int(Max(0, Min(255, $b))))
EndFunc
Func ARGB($a, $r, $g, $b)
Return BitOR(BitShift(Max(0, Min(255, $a)), -24), BitShift(Max(0, Min(255, $r)), -16), BitShift(Max(0, Min(255, $g)), -8), Int(Max(0, Min(255, $b))))
EndFunc
Func Min($a, $b)
Return $a < $b ? $a : $b
EndFunc
Func Max($a, $b)
Return $a > $b ? $a : $b
EndFunc