Unless the way i'm getting the RGB numbers is different than the way you get them, if a value is larger than 200 then it is going to be lighter.
I reckon, if R + G + B > 330 then it is light, but if it is less then its dark.
Just my findings.
Let me know what you think, i can post the code if needed.
BW
ps however having a value of 200+ for G by itself needs to also change from white text to black, as its too bright
This is the code i ended up using
Code:If (intRed + intGreen + intBlue < 350) And (intGreen < 200) Then Label1.ForeColor = vbWhite Else Label1.ForeColor = vbBlack End If





Reply With Quote