Converts to 8-bit grayscale. The active image must be 16-bit grayscale, 32-bit grayscale, 8-bit color or RGB color.
ImageJ converts 16-bit and 32-bit images to 8-bits by linearly scaling from min-max to 0-255, where min and max are the two values displayed in the Image>Adjust>Brightness/Contrast command. The command Image>Show Info displays these two values as the “Display range”. Note that this scaling is not done if “Scale When Converting” is not checked in Edit>Options>Conversions. With stacks, all the slices are scaled to 8-bits using the min and max of the currently displayed slice.
RGB images are converted to grayscale using the formula:

gray = 0.299 * red + 0.587 * green + 0.114 * blue

or the formula:

gray = (red + green + blue) / 3

if “Unweighted RGB to Grayscale Conversion” is checked in Edit>Options>Conversions (ImageJ 1.32g or later).