In trying to check that R, G, B gives white then would this statement suffice:
Code:if (R == G == B == 255)
{
....
}
Thanks
Printable View
In trying to check that R, G, B gives white then would this statement suffice:
Code:if (R == G == B == 255)
{
....
}
Thanks
No.
Code:if (R == 255 && G == 255 && B == 255)
{
}
Thanks for the fast answer !
No, you are looking to use ||, e.g., R == 255 || G == 255.
EDIT:
Oh yes, since you actually want all three to match 255, then yes && would be correct, not ||.
@Above: As far as I know, white is when (R == 255 && G == 255 && B == 255).
And like loxman said compare all to 255 or
if (R == G && G == B && B == 255) ...