I have this image:


What's the easiest way to convert the background from black to white?


It depends on the format of the source image and a few other factors.

hot flowchart action

  • In Photoshop, color inversion is via Image -> Adjustments -> Invert (Ctrl + I).
  • In GIMP, color inversion is via Image -> Colors -> Invert.
  • In MSPAINT, color inversion is via Ctrl + Shift + I.
  • 1
    Nice flowchart. – Matthew Read Apr 26 '11 at 20:33
  • 4
    @Matthew "Good artists copy, great artists steal." Flowchart idea stolen from blog.stackoverflow.com/2011/02/are-some-questions-too-simple :-) – Farray Apr 26 '11 at 20:37
  • 1
    Difficult to mask that one though. – e100 Apr 26 '11 at 20:44
  • 2
    @e100 Agreed. And even if the background could be effectively inverted without loss of fidelity, the thin lines would be extremely difficult to discern against white. – Farray Apr 26 '11 at 20:48
  • I recognized that one. :) – Mateen Ulhaq May 1 '11 at 1:20

The quickest way. (right-click >> view image to see it larger) enter image description here

Alternatively, here are the steps:

  1. Image >> Adjustments >> Selective color

  2. Colors: Blacks

  3. Slide Black: slider all the way to the left.

If you don't want the numbers to turn white (or anything else for that matter), make sure you do NOT select them (by selecting everything else)

Granted, still a few mistakes, but there's no perfect "easy" way, unfortunately it'll take a little work to get rid of any nuances.

  • 2
    Also using Replace Color… in the same menu then selecting the black color and adjusting it luminance to max results in the same result. Both Replace Color and Selective Color suffer from the ugly gray halo, though. – Jari Keinänen Apr 27 '11 at 8:35
  • +1 for Quick Way. Such a complex image is difficult to do properly, this provides a quick alternative. I suppose the question needs to be asked of the OP: What is the final image's use? – Dan Hanly Apr 27 '11 at 10:59
  • I agree with koiyu: the ugly gray halo is a killer. I personally do not find this solution acceptable. If I was forced to do something without being able to go back to the source to recreate the image, I would invert it, and then change the key to reflect the color changes – horatio Apr 27 '11 at 18:54
  • 1
    Of course it's not perfect and I dislike the gray halos myself, I'm just offering an alternative method that is very quick. It's really up to the OP what method he/she prefers. But I'll look into seeing if there's an elegant way to remove the grays. – Hanna Apr 27 '11 at 21:49

The easiest way is to invert the whole image with Ctrl-i.

This will of course invert the whole image, along with the background.

You can then shift the foreground colours back to a close (but not exact) match by inverting Hue (Image > Adjustments > Hue/Saturation > Hue: 180 degrees).

  • 1
    I was just about to add the hue shift, that makes the colors similar (enough) and if one must, brightness/levels/curves/etc can be adjusted to liking. It's good to note that a color on black is perceived a bit differently than a color on white, so better not just to look at the numbers. – Jari Keinänen Apr 26 '11 at 21:01
  • 2
    Additional note about inverting colors and shifting hue: while not color accurate, notice how powerful the blue lines are in the just inverted image, just like the yellow lines are in the original image. If you shift the hue, you lose the power, as yellow fades next to white. – Jari Keinänen Apr 26 '11 at 21:09

Use Curves.

Do not underestimate the power of the dark side of the force.

enter image description here

And for Jedi Knights:

enter image description here

May the force be with you!

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.