Gimp-Forum.net
Black turns into dark green after mode change. - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Black turns into dark green after mode change. (/Thread-Black-turns-into-dark-green-after-mode-change)



Black turns into dark green after mode change. - Harris - 03-11-2017

Good day! I am new to this community and would like to ask something.

I am making an image which contains a glowing symbol in the middle. The black parts are seen as transparent for the engine I am going to load it. That's why I want the values from the black areas to remain at zero after switching from RGB to indexed ( 256 ) mode. Instead black becomes a dark green color.

However when I try this with a plain black image it remains black, so my guess is that the whole picture is affected by the glowing thing I made in the middle. How can I prevent this from happening? I am using GIMP 2.8.16 if that matters.


RE: Black turns into dark green after mode change. - Ofnuts - 03-11-2017

You can try to coerce the image colors into a colormap that is very close to the one Gimp would compute, but with a pure black entry. Starting with your RGB image:
  • Image>Mode>Indexed (let Gimp create a colormap)
  • Windows>Dockable dialogs>Palettes
  • Right click, and "Import palette"
  • "Import palette from image", and give it a name
  • Edit the palette, set the darkest color to 0,0,0
  • Back to Image, and Undo Mode indexed
  • Image>Mode>Indexed again and give your palette
To edit the palette, three ways:
  • Use Gimp's palette editor when you are in the Palettes list. But you lay have a hard time spotting the darkest colors
  • Just edit the palette file (in the palettes subdirectory of your Gimp profile). This is a plain ASCII file. The darkedt color should be easier to spot. Once done, in the palette list: click the "<" icon on top right, then "Palettes menu>Refresh palettes"
  • Mix of the two: use the Gimp palette editor, but open the palette in a text editor to locale the darkest color.



RE: Black turns into dark green after mode change. - Harris - 03-11-2017

Wow, thank you! I would probably never figure this out by myself Big Grin