How to convert the colored tif picture into grayscale with corrosponding intensity?

Tags: #<Tag:0x00007fd5408a70d8> #<Tag:0x00007fd5408a6f98> #<Tag:0x00007fd5408a6e58>


Hi everyone.
I have obtained some 8-bit color images by EPMA. In these pictures, different colors indicated different intensities, (there is a histogram to indicate the intensities). I want to convert these colored pictures into grayscale with intensities corrospondingly, and then combine these grayscaled images together using channel merge , and then add different colors to each channel to compare differences of their distribution and intensity. Do you have some suggestion? thank you very much.
by the way, I have already changed these colored pictures into grayscale by Edit > Options > Conversions > (checked)scale with conversion, weighted RGB conversions, Image > type > 8-bit. But the conversion results are not in accordance with intensities indicated by the histogram, especially the red spots. See details in the attached pictures.

Original file: tif

Original file: tif
Thank you very much!



Good day Amy,

please realize what 8bit color means!
Please study:

8bit color images are no RGB images, hence conversion by changing them to gray-value cannot work by simply changing the image type!

As you’ve indicated, you need to know the applied LUT. A known LUT can be converted. In your case the LUT is very coarse, i.e. the steps are big and converting it will perhaps be not very satisfying: A lot of the original information (of the gray-valued image before applying false color) may be lost.





here is what I get when converting the false color image to gray according to the given LUT:

The gray steps ideally are 13.5 and the top two steps are the same. The values at the scale bar are about the fourfold gray values.




Hi Herbie,

Thank you very much, it really helps.
Did you use some Macro, Or just convert this by the existed Image J plugin?



Good day Amy,

your problem needs an individual solution.

If you’ve read the short section about false color and perhaps a bit more about LUTs, you should realize that you need a custom LUT that gets you from the color LUT to a reasonable gray LUT.

After having studied the manual, you should be able to convert the present color LUT to a reasonable gray LUT. The tools are provided by ImageJ. Getting a useful LUT for the conversion may take a while (of thinking and doing) …

i’d begin by looking at the present color LUT:

  1. Open your image in ImageJ
  2. “Image > Color > Show LUT”
  3. In the then opening dialog click on “List…”
  4. Save the LUT-list as text file

Then I’d modify a copy of the color LUT:

  1. Save a copy of the LUT-list and open it in a text editor
  2. In the text editor, modify the copy to contain reasonable gray values
  3. Gray values have the same value for Red, Green and Blue

Have success



Hi Herbie,

Thank you very much for your reply in such a detailed manner (that is what i need, i am new on ImageJ ). this a good solution.
And I have found another solution, there is a macro written by @oburri, it also helps a lot.

Best regards!


Great that this works for you! Would you mind linking to the macro or post, so that others reading this topic will be able to follow?



Hi, imagejan,
Of course I can post the link here. But I think this has already been post in ImageJ forum by @oburri. Shall I post it here again?


Alright, I found it now. The forum allows to cross-embed posts marking the text of interest and then pressing the Quote button that appears. So here is the link to the other forum topic:


Thank you very much.
But I am not good at this.