Function BightenessRGB virker ikke
Skal have denne function til at virke, ved ikke om i kan regne ud hvad den skal men den skal bruges til at justere lys udfra en farve... Håber nogen kan hjælpe...Function BightenessRGB(lColor As Long, lAmount as Long)
'lAmount: -100 - 100
r = CByte(lColor And &HFF&)
g = CByte((lColor And &HFF00&) \ &HFF&)
b = CByte((lColor And &HFF0000) \ &HFFFF&)
if lAmount>=0 then
r=r+round(lAmount*(255-r)/100)
g=g+round(lAmount*(255-r)/100)
b=b+round(lAmount*(255-r)/100)
else
r=r+round(lAmount*r/100)
g=g+round(lAmount*r/100)
b=b+round(lAmount*r/100)
end if
BightenessRGB=RGB(r,g,b)
End Function
