Now this is not what you might think at first, so please read the question clearly.

I have an image of an object, for example see this image:

Purple Couch

As you see it has a white background, and the main object image. What I would like to do is create a png in which the area covered by the image is transparent, preserving image shadows (while the white remains white). By shadow I mean the shadows over the image (not outside), so the result is an image with white background, and the object in full transparency in between and its shadows.

The idea here is that the resulting image is ready to be given any color I want, by creating a layer behind the transparent object layer and giving it any color. In my given example image, I should be able to make the purple sofa work with any color of my choice.

[EDIT] Please note that as final output I need the transparent image with the object shadows and curves (e.g. a png). I do not want to add color to it through photoshop, but use that image as a transparent png over other colors to give it the desired effect.

  • You could use the technique in this answer: graphicdesign.stackexchange.com/questions/29609/…
    – Joonas
    Commented Apr 8, 2015 at 21:50
  • Sorry Joonas, not what I wanted, please read the question carefully, I need a transparent png, not a coloured one. This is the reason I mentioned at the top of my question to read clearly.
    – Samnan
    Commented Apr 10, 2015 at 10:49
  • Which is exactly what that answer is about.
    – Joonas
    Commented Apr 10, 2015 at 10:53
  • Joonas, I wouldn't want to start another discussion here in the comments, but please check back on the link you sent me. It makes the background for the smoke semi-transparent and allowing it any background colour. Read Fannie's answer, compare the results of both and tell me if the result is the same, and I will agree
    – Samnan
    Commented Apr 12, 2015 at 7:08
  • Replace the text with the couch and you got exactly what you want. I didn't ask the question. You do the comparing. This is answer for another question, so it's not an exact answer to your question and certain things need to be the changed. Doesn't change the fact that it takes opaque image and makes it transparent.
    – Joonas
    Commented Apr 12, 2015 at 11:34

2 Answers 2


In Photoshop, go to Select > Color Range. Pick the purple color, and set the fuzziness around 100-120. Click Ok. Then invert the selection and create a layer mask: the purple color is gone. If the mask looks pixelated (mine did), go to Select > Refine mask and smooth it a bit.

Now click on the sofa and desaturate the layer to make sure the shadow is black and no purple pixels were left after the Color Range selection.

After that, you can add layers under the sofa and give it any color.

enter image description here

Note that the Color Range works well here because your sofa is purple; if there was a special pattern on it, selecting the colours would be much more complicated. You can always add colors to the Color Range selection by clicking on the Eyedropper+ icon.

[EDIT]: Added image

  • Works nicely! I am trying it on a image and almost got it working. Unless we have a better answer which gives finer results, I will upvote and mark as done! Thanks
    – Samnan
    Commented Apr 5, 2015 at 16:32
  • Having a little trouble as the color layer below goes lighter because the mask is not entirely transparent, perhaps what I need is just the 'shadows' inside the image so that they can sit over the color layer and give it the object effect... any hints on how can I do that?
    – Samnan
    Commented Apr 5, 2015 at 17:43

Set the blend mode of the original image to Luminosity and add a color underneath.

Quick and very good method.

A drawback/difference to Fannies answer is that the selected color might show darker on the couch - if you need extremely precise color controls, you can then lighten the original photograph.

enter image description here

Animated Instructions enter image description here

  • Not really helpful, can you provide all steps until I get a transparent image as required please?
    – Samnan
    Commented Apr 8, 2015 at 12:21
  • @Samnan Hey! You don't technically get a transparent image as such. However, this gives exactly the result you wanted: White stays white, shadows are conserved and you can change the color to anything you like. To make the process clearer, I've uploaded a gif. (Try downloading it, if you can't read the text). Commented Apr 8, 2015 at 15:50
  • Sorry but I mentioned in my question the desired output.. I want the transparent image mask, not a colored version of the image
    – Samnan
    Commented Apr 8, 2015 at 18:27
  • Well, you said that the resulting image is ready to be given any color I want. This method, as well as cockypups, work very well and very easy to achieve this. Meaning no disrespect to Fannie, her method results in a much lower quality image. May I ask what els you need the mask for, if not to achieve a clored version of the sofa? To you need to add patterns or somethin similar? Commented Apr 8, 2015 at 19:50
  • In my original question I explained "What I would like to do is create a png in which the area covered by the image is transparent, preserving image shadows (while the white remains white)". I think that explains clearly what I need. I have edited the question again for more clarity so that it helps others too.
    – Samnan
    Commented Apr 8, 2015 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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