Hacker News new | past | comments | ask | show | jobs | submit login

The formula for finding the difference in color is CIEDE2000, http://en.wikipedia.org/wiki/Color_difference#CIEDE2000, the actual number is quite meaningless, but in case you're interested:

  score = "perfect" if distance <= 2
  score = "very good" if distance > 2 and distance <= 6
  score = "good" if distance > 6 and distance <= 12 
  score = "average" if distance > 12 and distance <= 18
  score = "poor" if distance > 18
The score is more strict on the first exercise (Hue only)



Thanks for linking that. I recently contrived my own computer vision color difference formula by using distance within an HSL bicone (http://dl.dropbox.com/u/9632169/HTM/Hcl-hcv_models.svg). This is much better in that it takes into account differences in human sensitivity to certain colors.


Check out this fork of D3 that features Lab conversion and different distance formulas https://github.com/jheer/d3/blob/master/d3.color.js




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: