Skip to content

Instantly share code, notes, and snippets.

@Unitoi01
Created May 12, 2018 21:58
Show Gist options
  • Save Unitoi01/9d65536e8d34468e14b69e8cb2ae3f35 to your computer and use it in GitHub Desktop.
Save Unitoi01/9d65536e8d34468e14b69e8cb2ae3f35 to your computer and use it in GitHub Desktop.
Color Euclidean distance
def colorDifference(r,g,b,r1,g1,b1):
red= abs((r-r1)**2)
blue= abs((b-b1)**2)
green= abs((g-g1)**2)
answer=math.sqrt(red+blue+green)
return answer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment