Jump to content
You must now use your email address to sign in [click for more info] ×

Fill Layer Contents With Foreground Color


Recommended Posts

If I have some artwork on a layer,  lets say flattened text which is black.  and I want to fill that selection with red.   In photoshop Shift+alt+Delete will fill the contents of that layer with the foreground color. 

In both Photoshop and Affinity, if you select the contents of a layer, rather than just filling the contents, you will end up with a halo of the previous color. 

Is there a way to fill the contents of a layer completely, without first selecting the contents, specifically with the foreground color in Affinity?

 

fill-test.png

Link to comment
Share on other sites

Hi @Casey Whitcher, there are multiple ways to achieve what you want. One of the fastest that I can think of is this: Create a new layer, fill it with the foreground color and set its blend mode to "Lighten". This will work in your specific example with any color as long as you have black text on white background. With white text on black background, you would use "Darken" respectively. For anything in between, the case is more complicated and will depend on the colors used and your desired target colors.

ScreenShot2023-11-27-000307.thumb.png.2971baa7617dfada8b7fe2ebcd2f805f.png

Another method that works well with white backgrounds is this: Select your Background layer and go to Filters > Colors > Erase White Paper. You can then use Layer Effects to create a new Color Overlay. Granted, there's no direct access to the current foreground color here, but you could create a swatch first or simply use the eyedropper and drag it to the forground color selector. If you want your white background to reappear, the easiest way is to create a new Fill layer with white and drag it below your Background layer in the Layers panel.

EDIT: You can save the Erase White Paper step when you set the Blend mode of the Color Overlay to "Lighten" in the Layer Effects dialog.

ScreenShot2023-11-27-000308.thumb.png.53d527978c96abef156312113ce6a951.png

Again, with different text and background colors, things might become more complicated. Especially the Erase White Paper filter only works well with backgrounds that are 100 percent pure white. There are other methods people can show you here in the forums.

Cheers
kaffeeundsalz

Link to comment
Share on other sites

Assuming that by “flattened” you mean rasterised with a transparent background around the text you can add a Colour Overlay Effect to the Pixel Layer – see attached image.

The Colour Overlay Effect will non-destructively ‘overwrite’ any non-transparent pixel with a pixel of the colour of your choosing.

image.thumb.png.df7d3ebe15b0549dcd642fe4c0c6eba3.png

Link to comment
Share on other sites

  • Staff

Hi @Casey Whitcher,

Thanks for your post!

The above suggestions should hopefully workaround this issue for you - however I have logged a bug with our development team requesting further investigation, as I would expect Layer > Selection from Layer (or CTRL clicking a layers thumbnail) to create a full selection of the layers pixels, without leaving any 'fringe' pixels behind.

I hope this helps :)

Link to comment
Share on other sites

15 hours ago, GarryP said:

Assuming that by “flattened” you mean rasterised with a transparent background around the text you can add a Colour Overlay Effect to the Pixel Layer – see attached image.

The Colour Overlay Effect will non-destructively ‘overwrite’ any non-transparent pixel with a pixel of the colour of your choosing.

image.thumb.png.df7d3ebe15b0549dcd642fe4c0c6eba3.png

Thanks Gary,  this works really similar to the photoshop color overlay, and this works, and is a decent workaround,  I just hate that something like this needs a workaround,  instead of just a shortcut like shift+alt+delete  which Fills the layer automatically,  you know, but thank you.   

Link to comment
Share on other sites

15 hours ago, kaffeeundsalz said:

Hi @Casey Whitcher, there are multiple ways to achieve what you want. One of the fastest that I can think of is this: Create a new layer, fill it with the foreground color and set its blend mode to "Lighten". This will work in your specific example with any color as long as you have black text on white background. With white text on black background, you would use "Darken" respectively. For anything in between, the case is more complicated and will depend on the colors used and your desired target colors.

ScreenShot2023-11-27-000307.thumb.png.2971baa7617dfada8b7fe2ebcd2f805f.png

Another method that works well with white backgrounds is this: Select your Background layer and go to Filters > Colors > Erase White Paper. You can then use Layer Effects to create a new Color Overlay. Granted, there's no direct access to the current foreground color here, but you could create a swatch first or simply use the eyedropper and drag it to the forground color selector. If you want your white background to reappear, the easiest way is to create a new Fill layer with white and drag it below your Background layer in the Layers panel.

EDIT: You can save the Erase White Paper step when you set the Blend mode of the Color Overlay to "Lighten" in the Layer Effects dialog.

ScreenShot2023-11-27-000308.thumb.png.53d527978c96abef156312113ce6a951.png

Again, with different text and background colors, things might become more complicated. Especially the Erase White Paper filter only works well with backgrounds that are 100 percent pure white. There are other methods people can show you here in the forums.

Cheers
kaffeeundsalz

Thanks for the effort in this Kaffee, I do appreciate it,  however, I think the fact that you had to take so much effort to "explain' how to do a workaround that is a 1 second shortcut key in PS is the problem. 

Link to comment
Share on other sites

For the record, I think probably my go to way of doing this would be to fill a layer with the color I want to use,  then set the cut from layer to visible, ctrl+click the layer to select all the pixels, then jump back to the solid layer and ctrl+J to cut it from the solid layer, the delete my solid layer....  Just seems like a lot of work. 

Link to comment
Share on other sites

8 hours ago, Casey Whitcher said:

Thanks for the effort in this Kaffee, I do appreciate it,  however, I think the fact that you had to take so much effort to "explain' how to do a workaround that is a 1 second shortcut key in PS is the problem. 

I beg to differ, but that's of course a subjective thing. 1) What I showed you was not a workaround but how things are done in a different software instead, in this case Affinity Photo. If you expect everything to work exactly as in Photoshop, I'd recommend sticking with Photoshop. 2) It didn't actually take that much effort to explain the steps, I just tried to do it thoroughly and provide some screenshots to make it easier for you to follow. Sorry if you confused that with complexity. 3) After all, creating a fill layer and changing its blend mode is indeed a one second operation in Affinity Photo, too. Also, the limitations I mentioned are the same than in Photoshop; if your text layer doesn't have any transparency information, Shift+Alt+Delete won't be of much help either with what you want to accomplish.

Link to comment
Share on other sites

8 hours ago, Casey Whitcher said:

For the record, I think probably my go to way of doing this would be to fill a layer with the color I want to use,  then set the cut from layer to visible, ctrl+click the layer to select all the pixels, then jump back to the solid layer and ctrl+J to cut it from the solid layer, the delete my solid layer....  Just seems like a lot of work. 

That does seem to be a lot of work, and I don't understand why you think you have to do it this way or why it's supposed to be a better method than those that were already mentioned. But if you further explain your workflow, people here in the forum will most likely be able to give you further assistance.

Link to comment
Share on other sites

2 hours ago, kaffeeundsalz said:

That does seem to be a lot of work, and I don't understand why you think you have to do it this way or why it's supposed to be a better method than those that were already mentioned. But if you further explain your workflow, people here in the forum will most likely be able to give you further assistance.

I do appreciate the effort you went to. I recognize that in practical function, the process would be very fast; it is just a couple of extra clicks, and actually, it is nearly identical to doing a color overlay effect in Photoshop.

I typically don't use that method in Photoshop because I find shift+alt+delete to be faster. 

I tutor students (or anyone who will pay me LOL, on Adobe products).  I am keeping Adobe and Affinity.  I'd like to offer my services in Affinity as well, so I'm trying to understand the differences and the most efficient ways of doing things in Affinity. 

I've been very pleased with Affinity so far, so I really just assumed that I was not finding the shortcut equivalent to shift+alt+delete, assuming it was there but just slightly different.  

Using color overlay worked quite well in this instance with a recent pallet I'm using, both for some duplicated feathered black circles and actually text still as text as well in Affinity.

Although I would still love to see a shift+alt+delete equivalent. :)

 

fill-example.png

Link to comment
Share on other sites

Hi @Casey Whitcher, thanks for your explanations and the screenshot. That makes things a lot clearer for me. Here are some further comments that might or might not help:

  1. I see where you're coming from. In my opinion, it's a very specific use case, but yes: If you do have Pixel layers with transparency and want to fill them with a pre-selected uniform color, then there's no one step keyboard shortcut to do so in Affinity Photo. In order for this to work, Photo would need a "lock transparency" setting in various places of the UI, most notably  the Layers panel and, which is what you'd need, the Fill commands in the edit menu
  2. One thing I don't understand is why all your shapes in your screenshot are pixel layers. You do notice that when you create them with Affinity Photo's shape tools from the Tools panel, each object has its own distinct fill color? And that the primary/secondary color selector immediately update when you select one of those shapes? The same is true with text objects – which you did not convert to pixels in your screenshot. This means that you don't need the Color Overlay effect at all to change the text color. You can do it directly with the text object's own fill color which will immediately show as primary color as soon as you select one of the text layers.

Cheers
kaffeeundsalz

Link to comment
Share on other sites

3 hours ago, kaffeeundsalz said:

Hi @Casey Whitcher, thanks for your explanations and the screenshot. That makes things a lot clearer for me. Here are some further comments that might or might not help:

 

  1. One thing I don't understand is why all your shapes in your screenshot are pixel layers. You do notice that when you create them with Affinity Photo's shape tools from the Tools panel, each object has its own distinct fill color? 

Simply for example, When I'm usually filling something in that manner, it is not a specific shape. Usually, some random cut out of something for some random reason, might be a screenshot modification or a selection I've expanded and feathered, etc.  That's the beauty of shift+alt+del in PS (and the color overlay in both) it works on feathered selections and doesn't give it a solid fill. 

Like this example of a black circle with a heavy gaussian blur on it. 

fuzzy.png

Link to comment
Share on other sites

On 11/27/2023 at 3:36 PM, Dan C said:

Hi @Casey Whitcher,

Thanks for your post!

The above suggestions should hopefully workaround this issue for you - however I have logged a bug with our development team requesting further investigation, as I would expect Layer > Selection from Layer (or CTRL clicking a layers thumbnail) to create a full selection of the layers pixels, without leaving any 'fringe' pixels behind.

I hope this helps :)

I don’t thing there is a bug.

when you use selection from layer, only the alpha channel gets converted into a selection.

use channels panel to inspect all channels individually.

Now, while this selection is active, when you use the fill tool for recoloring, partial transparent pixels get only partially changed to the new color, and alpha stays unchanged. For fully opaque pixels, you get the new color, but for all other pixels you get a mixture, which is always kind more greyish and looks like a halo. Transparent areas will get mixed with black by default (even if the canvas is shown white!), explaining the much darker halo.

This makes artistic sense when you actually want to create a smooth transition between an actual background color and the selected area.

As explained above, you will get a surprising dark halo for documents with (a) semi-transparent layer content and (b) canvas set to be non-transparent (by default).

It is a kind of UI bug that by default the transparent areas of the canvas are shown in white, while the blend formula will always take black. It would be more logical to place a white fill layer or rectangle as bottom layer to avoid this effect.

All said above is valid for RGB, but even more irritating for CMYK documents.

 

The current handling of Affinity is illogic for handling of transparent areas in canvas:

- color of canvas rendered (white)

- color values used for layer blending (black) in canvas

- colors shown in layer thumbnails of channels panels (black, even for CMYK docs)

 

 

 

 

When you 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

17 hours ago, Casey Whitcher said:

Simply for example, When I'm usually filling something in that manner, it is not a specific shape.

I see. Color Overlay in Layer Effects would probably be the solution I'd choose then. Just for the record, though I did get that you just provided it as an example: You CAN blur shapes without converting them to pixel layers and still keep their properties including the fill color. This works because a) Gaussian Blur happens to be available as a Layer Effect and b) most Adjustments and Effects can be applied non-destructively, not altering the layer contents they're applied to.

ScreenShot2023-11-29-000315.thumb.png.14dd7b74c6ffd42e0a476b517cb81d58.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.