I wrote below code for getting top left color but it is not working as expected. addColorFromYUV420(data, mSelectedTopLeftColor, (i * POINTER_RADIUS + j + 1), POINTER_RADIUS, POINTER_RADIUS, mPreviewSize.width, mPreviewSize.height);