docs/odo-scroll-feedback/scripts/demo.js
function getHueDifference(value) {
    return hues.reduce(function (min, hue) {
      var diff = Math.abs(hue - value);
      if (diff < min) {
        return diff;
      }
      return min;
    }, Infinity);
  }
function getHueDifference(value) {
    return hues.reduce(function (min, hue) {
      var diff = Math.abs(hue - value);
      if (diff < min) {
        return diff;
      }
      return min;
    }, Infinity);
  }
function getHueDifference ( value ) { return hues . reduce ( function ( min , hue ) { var diff = Math . abs ( hue - value ) ; if ( diff < min ) { return diff ; } return min ; } , Infinity ) ; }
Returns the hue with the smallest difference.
Returns the hue with the smallest difference .