dektar / ColorNamer

The code behind the ColorNamer app, https://play.google.com/store/apps/details?id=com.color.colornamer&hl=en
GNU General Public License v3.0
25 stars 41 forks source link

HSV instead of RGB for calculateDistance #12

Open hackerb9 opened 8 years ago

hackerb9 commented 8 years ago

It's oft been remarked that calculating the "distance" between two colors in RGB space doesn't match human visual perceptions very well. There are many other color spaces that work better, but HSV (hue, saturation, value) is an easy one to use and could dramatically improve the results without much work. The relevant code to change is, I believe, calculateDistance at the end of ColorData.java.