Jimmy

Jimmy

  • NA
  • 1
  • 18.7k

Solved: Comparing Color RGB Values.

Jan 16 2011 9:53 PM
Im looking for a way to make sure that a color is white or at least whiteish.

What could i do to compare different but similar values.
Suppose we have these colors:

Color A =  Color.FromArgb(0,255,250,255);
Color B =  Color.FromArgb(0,255,254,253);

Color A == B is false
Converting ToArgb from color white gives me -1 and for black -16777216
I cant make much sense out of that. Also, it wont allow me to convert Color A/B.

Enough rambling. Whats the best way to accomplish what im trying to do?
I guess if i figured out a way to convert one Color data type back to their RGB values i could compare those values separately.
But i dont know how too or if there is a better way.

Thanks for any eventual help.

Answers (1)