57

I have made an image with three colors: RGB

I want to swap each channel to a specific color. Is there a way to do that efficiently with GIMP?

Example:

enter image description here

I would like:

  • Blue: #434343
  • Red: #EEEEEE
  • Green: #BBBBBB
gronostaj
  • 55,965
  • 20
  • 120
  • 179
user40642
  • 681
  • 1
  • 5
  • 4

3 Answers3

63

For GIMP 2.6.12, Just use Colors -> Map -> Color Exchange

jdwhitfield
  • 731
  • 5
  • 3
  • 2
    This solution works, but what if we want to keep gradient border ? – user2668735 Dec 23 '19 at 12:08
  • Is it normal that there is still a bit of black borders remaining in a barcode? Any solution to get it completely blue? I want it blue because my printer only has the blue cartridge working correctly so the printing is more visible when printing blue. – baptx Aug 10 '23 at 18:19
13

Try Filters -> Colors -> Map -> Color Exchange... in RGB mode.

You should be able to replace one color with another easily.

Craig Finch
  • 123
  • 6
Nicolas Bazire
  • 321
  • 1
  • 5
  • Seems so promising but doesn't seem to work if the color you're swapping out is transparent (alpha = 0). – Phil Mar 02 '20 at 05:16
  • What if we want to preserve a gradient? I have white text on a colored background and I would like to replace it with colored text on a white background. – Aaron Franke Jul 26 '20 at 19:44
9

To directly modify how each channel is interpreted, use Colors -> Components -> Channel Mixer.

To get what you want, you would select

  • Blue:
    • Red: 26.3
    • Green: 26.3
    • Blue: 26.3
  • Red:
    • Red: 93.3
    • Green: 93.3
    • Blue: 93.3
  • Green:
    • Red: 73.3
    • Green: 73.3
    • Blue: 73.3
sbell
  • 197
  • 1
  • 4
  • 1
    This solution is the only one working, by changing gradient borders as well. Sadly most of the time, we just want to choose the destination color by using the hex code. Any idea to do that ? – user2668735 Dec 23 '19 at 12:10