I am creating a kind of color tool and this tool should tell me if color is close to another color, For example:
Color[] colors = new colors[] { Color.FromArgb(0,0,255), Color.FromArgb(0,109,251)};
//colors[0] IS BLUE
//colors[1] IS BRIGHTER BLUE (#006DFB)
bool TheyClose = ColorsAreClose(colors[0],colors[1]); //TRUE BLUE IS CLOSE
//TheyColse Should Be = TURE
How should a ColorsAreClose()
function Look?
How about something like this?
(I just guessed at the default threshold, but you should set it to what you want.)
Basically this just computes, on average, whether the three color channels are close enough between the two colors.