'Check if a Color is ind a range X% from the actual point
Private Function SimilarColor(ByVal Red1 As Long, ByVal Green1 As Long, ByVal Blue1 As Long, ByVal Red2 As Long, ByVal Green2 As Long, ByVal Blue2 As Long, ByVal ADif As Long) As Boolean
'Check if the color is in our range
If Abs(Red1 - Red2) <= ADif And Abs(Green1 - Green2) <= ADif And Abs(Blue1 - Blue2) <= ADif Then SimilarColor = True
End Function
Private Function SameColor(Red As Byte, Blue As Byte, Green As Byte) As Byte