Gimp-Forum.net

Full Version: Black turns into dark green after mode change.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
Wow, thank you! I would probably never figure this out by myself Big Grin