RSS/Atom feed Twitter
Site is read-only, email is disabled

map all colors that aren't already white/gray/black, to #808080?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

map all colors that aren't already white/gray/black, to #808080? Scott Jacobs via gimp-user-list 25 Mar 20:11
Scott Jacobs via gimp-user-list
2017-03-25 20:11:18 UTC (about 7 years ago)

map all colors that aren't already white/gray/black, to #808080?

One way to do this is to remove the color to a separate layer, select it, and fill with whatever grey you like:

Duplicate the image layer. On the duplicated layer, remove all color (Colors->Desaturate, or whatever). Set the layer mode of the duplicated layer to Difference. Since all black/grey/white pixels are desaturated already, the difference between the two layers will be zero, or black. If we now remove all black pixels, we are left with only the pixels that had been colored.

Layer->NewFromVisible; make sure this new layer has an Alpha Channel (Layer-context-menu->AddAlphaChannel) (At this point, everything but the color should be black) In the new layer, Select the black (with a 0.0 threshhold, I imagine) and Edit->Clear. Now, all non-color will be transparent. Invert the selection (Select->Invert). Click on the foreground color, and make it whatever grey you like. Edit->FillWithFGColor, and the colored areas will now all be your favored grey. If you now only make visible (eyeball symbol on layers dock) this new layer (probably called Visible) and your original layer, you should now have what you wanted.

(NOTE: I was testing this with merely grey/black/white areas/lines, and green/blue/red "paint"/"Airbrush" lines. It is possible that if a photo was used that some un-considered issue would arise that would also need to be addressed. I was assuming a largly black/white grey image, with a bit of color. If the image was largely colored, then of course the resultant image would be almost completely grey...)