Gimp-Forum.net
Set layer color based on other layers - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Set layer color based on other layers (/Thread-Set-layer-color-based-on-other-layers)



Set layer color based on other layers - Hellcolik - 03-27-2021

Hello, this is my first post here ; I'm wondering what are the limits of Gimp without using external python scripts.

I have two layers in a project:
  • the back layer is a picture on which I applied a Gaussian blur filter ;
  • the front layer in only a text.
I would like the text layer to change depending on where it is above the back layer. For instance, I would like to order it : "to set the color of this pixel of yours, look at the color of the pixels on the layer behind you, centered at the same location, take the negative of that color and apply it to yourself".

What are the tools/menus I need to be familiar with in order to perform such a task? I would be able to do this with a python script however, I only want to use Gimp.

Thanks in advance, I'm looking forward to reading your answers.


RE: Set layer color based on other layers - Krikor - 03-27-2021

Possibly I must not have understood the question well.

Having the original image duplicate it.
Create your text in a new layer above the images.
Apply a blur to the first layer of the image - the bottom one.
Apply alpha to the image in the second layer - Add alpha channel

In the text layer, apply alpha for selection;
Invert the selection - Select - Inverse or Ctrl + I.
Select the layer with the image without the blur - Second layer.
Delete the inverted selection - Edit - Clear or Delete.

Now the text layer can be deleted or removed from view.

Perhaps with Layer Modes it is possible to achieve something interesting. But you seem to want the negative color of the original image, so:

In the image below I used Colors - Invert and Colors - Value invert .


RE: Set layer color based on other layers - Blighty - 03-27-2021

(03-27-2021, 12:04 PM)Hellcolik Wrote: I would like the text layer to change depending on where it is above the back layer.

Have a look at this thread:
https://www.gimp-forum.net/Thread-Can-the-Color-of-Text-Be-Automatically-Inverted-Based-on-its-Background


RE: Set layer color based on other layers - Hellcolik - 03-27-2021

(03-27-2021, 01:44 PM)Blighty Wrote:
(03-27-2021, 12:04 PM)Hellcolik Wrote: I would like the text layer to change depending on where it is above the back layer.

Have a look at this thread:
https://www.gimp-forum.net/Thread-Can-the-Color-of-Text-Be-Automatically-Inverted-Based-on-its-Background

Thank you, this is exactly what I was looking for. It seems I've been missing one of the key functions of the software, I will try to use it smartly from now on.

Thank you also krikor for the detailed procedure. Smile