code: private void calculateColor(int coord) {
      	    coord = coord - mBarPointerHaloRadius;
      	    if (coord < 0) {
      	    	coord = 0;
      	    } else if (coord > mBarLength) {
      	    	coord = mBarLength;
      	    }
  
      		mColor = Color.HSVToColor(
      			Math.round(mPosToOpacFactor * coord),
      			mHSVColor);
      		if (Color.alpha(mColor) > 250) {
      		    mColor = Color.HSVToColor(mHSVColor);
      		} else if (Color.alpha(mColor) < 5) {
      		    mColor = Color.TRANSPARENT;
      		}
          }
docs: Calculate the color selected by the pointer on the bar.
  
  @param coord Coordinate of the pointer.