3

Please could someone advise the best way, step by step, to swap the green with the white in this image?

Swap two colours around in an image

I've got as far as managing to make all of the white a selection in it's own layer.

I have tried various fiddling about with inverting colours, replacing colours etc and not managed to achieve what I'm after.

If it isn't obvious, it is a basic globe and I'm basically wanting to make all the land white and all the sea transparent (will appear green because of the background layer though).

1
2

I think in this case the absolutely easiest thing to do is to use a Gradient Map and remap greens to whites and whites to greens:

enter image description here

update:

Super quick transparency.

  • desaturate, levels so that image would be black-n-white enter image description here

  • in the Channels panel Ctrl-Click to load a channel as selection. White will be fully selected, black — non-selecte enter image description here

  • create Solid Color from selection: and done. 5 seconds, a very sharp result enter image description here

  • optionally invert selection before creating a solid or invert mask colors of the solid layer to invert the transparency enter image description here

3
  • Thanks, this seems to have done the job well.
    – zigojacko
    Jan 7 at 14:56
  • 1
    That will give you a two-colour result. You asked for one colour & transparency.
    – Tetsujin
    Jan 7 at 15:16
  • 1
    @zigojacko added quick method of getting transparency Jan 7 at 15:34
2

The linked question has a good explanation for a more complex process, but when there is such a simple 2-colour image, the swap is easier.

After opening the image, click the padlock in the layers list - this will make any erased background transparent rather than the background colour.

Select the Magic Wand, these were the settings I used; it's going to be reasonably tolerant on a simple image
enter image description here
Click anywhere in the green.
Cut.
Paste.
You now have two layers one with each colour, the green layer is selected.

Select the Paint Bucket.
Opt-click any white area.
Click in the green area.

You can now actually just switch off (or delete) the other layer & there's your image, white on transparent.

If you wanted to swap both colours, then after you opt/click white, hit X then opt-click green. This will preload both your brush colours.
You can then repeat the same process on the other layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.