convert = function(x, y, hue){
      if (hue < 0) {
        hue += 1;
      } else if (hue > 1) {
        hue -= 1;
      }

      if ( ( 6 * hue ) < 1 ) {
        return ( x + ( y - x ) * 6 * hue );
      } else if ( ( 2 * hue ) < 1 ) {
        return ( y );
      } else if ( ( 3 * hue ) < 2 ) {
        return ( x + ( y - x ) * ( ( 2 / 3 ) - hue ) * 6 );
      } else {
        return x;
      }
    }
For a color expressed as an RGBA array, return the corresponding HSBA value

@param {Array} rgba An 'array' object that represents a list of RGB colors
@return {Array} an array of HSL values