code: private void calculateColor(int coord) {
  	    coord = coord - mBarPointerHaloRadius;
  		if (coord > (mBarLength / 2) && (coord < mBarLength)) {
  			mColor = Color
  					.HSVToColor(new float[] {
  							mHSVColor[0], 1f, 1 - (mPosToSVFactor * (coord - (mBarLength / 2)))
                      });
  		} else if (coord > 0 && coord < mBarLength) {
  			mColor = Color.HSVToColor(new float[]{
                      mHSVColor[0], (mPosToSVFactor * coord), 1f
              });
  		} else if(coord == (mBarLength / 2)){
              mColor = Color.HSVToColor(new float[]{
                      mHSVColor[0], 1f, 1f
              });
          } else if (coord <= 0) {
  			mColor = Color.WHITE;
  		} else if (coord >= mBarLength) {
  			mColor = Color.BLACK;
  		}
  	}
docs: Calculate the color selected by the pointer on the bar.
  
  @param coord Coordinate of the pointer.