Skip to main content
Participant
January 22, 2021
Question

Replacing B&W with a gradient of colors

  • January 22, 2021
  • 2 replies
  • 3537 views

Hi,

 

I'm currently facing some technical issue. I have a black & white image, with a transparent background. In addition, I have a (linear) gradient, from one color (yellow) to another (purple). I'm trying to create a replica of the B&W image, such as each gray pixel turn into a pixel colored in the same proportion of yellow/purple as it was colored in white/black.

 

There is another way of describing this probleme : let's assume you have a bicolor picture, and you know the two main colors (each pixel being colored with a combination of those two).  Simply apply a B&W filter to your image. Then, given the two initial colors, how can you reconstitute the first picture ?

 

If you have any idea to do this, feel free to volunteer your answer !

Thanks a lot 🙂

2 replies

Conrad_C
Community Expert
Community Expert
January 23, 2021

There are two kinds of gradient adjustment layers, so for this purpose make sure you select Gradient Map, not Gradient Fill.

 

Participant
May 3, 2023

Hello, I was wondering if someone can advise on a method (if there is one) to do this with two gradients to be applied depending on grayscale value being above or below a certain amount (i.e if the rgb value is 127,127,127 or below, apply gradient A and if it's over 127 apply gradient B)? 

c.pfaffenbichler
Community Expert
Community Expert
May 3, 2023

Why don’t you »pack« both gradients into one gradient? 

If that isn’t possible a more involved scenario (utilizing Blend If and Adjustment Layers) may be necessary. But that should be don in 16bit. 

davescm
Community Expert
Community Expert
January 22, 2021

Use a gradient adjustment layer. That will convert the black to white tones into the colours you set in the gradient adjustment layer properties.

Dave