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

Photo v2 Mac color replacement brush puzzle


Recommended Posts

What am I missing? I am trying to replace the color of the lady's purple shorts with green. In a transparent area, the brush paints green. Over the pants, however, it paints a different hue. This happens with any color I try, in any aphoto file. Surely I'm doing something wrong. Attached are brush setting and the photo in question. Here is a quicktime movie of what happens: 

https://www.dropbox.com/s/oxuwbtzc575fqmz/color replacement.mov?dl=0

Thanks for help!

color rep context.jpg

color rep.jpg

Link to comment
Share on other sites

Might be better to make some selection of the purple shorts and then perform the recoloring instead via the "New Adjustment Layer -> Recolor" way ...

shorts_purple.jpg.5848612b8587820c3db4d04f7065796e.jpg

shorts_recolor.jpg.3c80f211b4fb4cb3f4f2f1b6067179b0.jpg

Personally I hate that unprecise and very CPU & memory intensive "Color Replacement Brush Tool", which is crap IMO!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

1 hour ago, jdvoracek said:

What am I missing?

If you're using the Color Replacement Brush Tool, you're misunderstanding how it works, because contrary to it's name it does not replace "colors" but rather "hues". 

https://affinity.help/photo2/en-US.lproj/pages/Painting/replaceClrs.html

Quote

The targeted color's hue will be replaced with the current Primary color's hue, while retaining saturation and lightness values of the original pixels.

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

29 minutes ago, walt.farrell said:

If you're using the Color Replacement Brush Tool, you're misunderstanding how it works, because contrary to it's name it does not replace "colors" but rather "hues". 

https://affinity.help/photo2/en-US.lproj/pages/Painting/replaceClrs.html

 

What? Me misunderstand AP?? It would help if they would rename it the HUE REPLACEMENT BRUSH for dummies! So conceptually I can understand the manual you link, but when would you use such a feature? A color is defined by hue, saturation and lightness, so why call it a color replacement if all you replace is the hue?

 

 

Link to comment
Share on other sites

26 minutes ago, jdvoracek said:

It would help if they would rename it the HUE REPLACEMENT BRUSH for dummies!

You're not the first to have that idea :) 

26 minutes ago, jdvoracek said:

But I still don't understand what it is doing...

You can get an idea by considering colors using the HSL Slider setting on the Color panel. For example, here's a nice green color: 

 

image.png

And here's a sampled purplish color from the first image @v_kyr posted above: 

 

 

image.png

 

If you replace the Hue value of that purplish color with the Hue value from the green color, while leaving the Saturation and Luminance alone,  you get the darker green shown here, instead of the green you started with. And that's what the "Color" Replacement Brush does, too. It modifies Hue, while leaving Saturation and Luminance unchanged.

 

 

image.png

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

  • 7 months later...

I am having the same problem with color replacement brush tool. As much as I can see from this YouTube tutorial, the color replacement brush tool should replace the target color with exact primary color chosen, not just hue. It is a mystery to me why it does not work for me as tutorial shows. Spent hours of trying with no luck.
I am currently using the Affinity Photo v2.3 for Windows.
 

 

Link to comment
Share on other sites

Is would be a really bad idea if CRB would replace H S and L by a constant value chosen in color panel.

This would create a solid fill color, like the regular paint brush.

If the lightness of colors doesn’t match, you can add HSL adjustment (and merge it down) after having the color replaced. 
 

There are uncountable better workflows if you intend to change all three HSL for a source area in a meaningful way (keeping some of the texture).

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

2 hours ago, NotMyFault said:

 [It] would be a really bad idea if CRB would replace H S and L by a constant value chosen in color panel.

This would create a solid fill color, like the regular paint brush.

^^ This ^^

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

On 3/17/2024 at 12:36 AM, TihoS said:

As much as I can see from this YouTube tutorial, the color replacement brush tool should replace the target color with exact primary color chosen,

It works in that tutorial because of the colors they were using. With different colors it would not work the same way.

(Edit: Though perhaps there is also a bug. See below.)

Edited by walt.farrell
added a clarification

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

10 hours ago, TihoS said:

As much as I can see from this YouTube tutorial, the color replacement brush tool should replace the target color with exact primary color chosen, not just hue. It is a mystery to me why it does not work for me as tutorial shows. 
 

To begin, most people use the terms COLOR and HUE interchangeably. It's very common to assume the two mean the same thing. Colloquially speaking they sort of do, but technically speaking they don't. Think of COLOR in the HSL model where a color is fully defined by HUE and SATURATION and LIGHTNESS. Affinity has poorly named this tool as the "COLOR replacement brush", when it is really the HUE replacement brush. 

Even Affinity is inconsistent with the use of "color". Correctly, on one help page Affinity technically explains: "The targeted color's hue will be replaced with the current Primary color's hue, while retaining saturation and lightness values of the original pixels." You can verify this by testing as I did. However, on another help page Affinity colloquially states: "The Color Replacement Brush Tool works by replacing the color of pixels on the current layer with the Primary color selected on the Color panel." The correct statement would replace the word "color" with "hue".

The tutorial is misleading because it does not address the important difference between color and hue and Affinity's inconsistent help pages. Moreover, the choice of colors he uses does not illustrate the difference (unless you look very closely).

Link to comment
Share on other sites

7 hours ago, jdvoracek said:

Affinity has poorly named this tool as the "COLOR replacement brush", when it is really the HUE replacement brush. 

Almost since day 1 of the first release of AP V1, I (among others) have posted in many topics that this brush should be named the Hue Replacement Brush Tool, but to no avail.

7 hours ago, jdvoracek said:

However, on another help page Affinity colloquially states: "The Color Replacement Brush Tool works by replacing the color of pixels on the current layer with the Primary color selected on the Color panel."

FWIW, the link to the online US English version of that page for V2 is https://affinity.help/photo2/en-US.lproj/index.html

Try https://affinity.help/photo2/en-US.lproj/pages/Tools/tools_clrReplacementBrush.html

It is the same for V1 at https://affinity.help/photo/en-US.lproj/index.html, so this inconsistency has remained uncorrected for a very long time.

Try https://affinity.help/photo/en-US.lproj/pages/Tools/tools_clrReplacementBrush.html

Edited by R C-R
Thanks Alfred

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

3 hours ago, R C-R said:

FWIW, the link to the online US English version of that page for V2 is https://affinity.help/photo2/en-US.lproj/index.html

It is the same for V1 at https://affinity.help/photo/en-US.lproj/index.html, so this inconsistency has remained uncorrected for a very long time.

Those are links to the index pages (i.e. home pages) for the Help, not pages about colour replacement.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

3 minutes ago, Alfred said:

Those are links to the index pages (i.e. home pages) for the Help, not pages about colour replacement.

Thanks! You might think that by now I would not make that stupid mistake but I still do it from time to time.

I just fixed the links in an edit.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Thank you guys. I understand color, H, S and L values but even for the hue, the replacement color is extremely inaccurate. If I chose a red color and paint over green surface and the color I get is light pink, then something is seriously off. Why this toll cannot work like HSL tool and preserve SL values but appear red instead of pink? This way, the tool is essentially useless.

Link to comment
Share on other sites

5 minutes ago, TihoS said:

Thank you guys. I understand color, H, S and L values but even for the hue, the replacement color is extremely inaccurate. If I chose a red color and paint over green surface and the color I get is light pink, then something is seriously off. Why this toll cannot work like HSL tool and preserve SL values but appear red instead of pink? This way, the tool is essentially useless.

What are the HSL values for the red brush and for the green you are painting over? 

Link to comment
Share on other sites

I think I've seen something about this before. I used the Color Replacement Brush set to a Red (357, 100, 50) to paint over a Green (130, 100, 50) and got a Pink (357,100, 72), so it had an unexpected change to L as well as to H: 

 

image.png

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

10 minutes ago, walt.farrell said:

I think I've seen something about this before. I used the Color Replacement Brush set to a Red (357, 100, 50) to paint over a Green (130, 100, 50) and got a Pink (357,100, 72), so it had an unexpected change to L as well as to H: 

@walt.farrell OMG! Confirming your result: @TihoS is correct. Not only is that tool misnamed, it is misfunctioning! 

ColorWhatBrush.jpg

Link to comment
Share on other sites

1 hour ago, walt.farrell said:

I used the Color Replacement Brush set to a Red (357, 100, 50) to paint over a Green (130, 100, 50) and got a Pink (357,100, 72), so it had an unexpected change to L as well as to H: 

Same for me in AP V2.4.0 on my Mac.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

7 hours ago, walt.farrell said:

I used the Color Replacement Brush set to a Red (357, 100, 50) to paint over a Green (130, 100, 50) and got a Pink (357,100, 72), so it had an unexpected change to L as well as to H

 

The tool will be using a Hue-Chroma-Luminance colour model, not HSL, to calculate the result of changing hue, hence the change of more than just hue when inspecting the HSL values.

Link to comment
Share on other sites

48 minutes ago, lepr said:

 

The tool will be using a Hue-Chroma-Luminance colour model, not HSL, to calculate the result of changing hue, hence the change of more than just hue when inspecting the HSL values.

While this is probably in line with other adjustments and layer blend modes based on HCL, I start feeling some sympathy to those who rate this tool as useless. It is almost impossible to predict which replaced color you get from your input in color panel (made in RGB, HSL, or by just clicking in the „source“ color you want but do not get). Hue and saturation are roughly fitting, but luminosity is often much higher than both input colors.

For me it looks more like a gamma correction gone wrong. Both input colors with 0.5 L lead to roughly 0.75 as result.

The only reason to use the CRB is it’s nice property to re-sample the color continuously, which is not available in other workflows using regular masking / selection tools.

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

For those interested in luma/chroma/hue model

 

https://en.wikipedia.org/wiki/HSL_and_HSV

Color-making attributes

See also: Color vision

The dimensions of the HSL and HSV geometries – simple transformations of the not-perceptually-based RGB model – are not directly related to the photometric color-making attributes of the same names, as defined by scientists such as the CIE or ASTM. Nonetheless, it is worth reviewing those definitions before leaping into the derivation of our models.[D] For the definitions of color-making attributes which follow, see:[16][17][18][19][20][21]

Hue
The "attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors: red, yellow, green, and blue, or to a combination of two of them".[16]
Radiance (Le,Ω)
The radiant power of light passing through a particular surface per unit solid angle per unit projected area, measured in SI units in watt per steradian per square metre (W·sr−1·m−2).
Luminance (Y or Lv,Ω)
The radiance weighted by the effect of each wavelength on a typical human observer, measured in SI units in candela per square meter (cd/m2). Often the term luminance is used for the relative luminance, Y/Yn, where Yn is the luminance of the reference white point.
Luma (Y)
The weighted sum of gamma-corrected R, G, and Bvalues, and used in YCbCr, for JPEG compression and video transmission.
Brightness (or value)
The "attribute of a visual sensation according to which an area appears to emit more or less light".[16]
Lightness
The "brightness relative to the brightness of a similarly illuminated white".[16]
Colorfulness
The "attribute of a visual sensation according to which the perceived color of an area appears to be more or less chromatic".[16]
Chroma
The "colorfulness relative to the brightness of a similarly illuminated white".[16]
Saturation
The "colorfulness of a stimulus relative to its own brightness".[16]

and layer blend modes (in Photoshop) hue, saturation, luminosity

https://en.wikipedia.org/wiki/Blend_modes

Hue, saturation and luminosity

Photoshop's hue, saturation, color, and luminosity blend modes are based on a color space with hue, chroma and luma dimensions. Note: this space is different from both HSL and HSV, and only the hue dimension is shared between the three. See the article HSL and HSV for details.

Unlike all of the previous blend modes described, which operate on each image channel independently, in each of these modes, some dimensions are taken from the bottom layer, while the remainder are taken from the top layer. Colors which end up out of gamut are brought inside by mapping along lines of constant hue and luma. This makes the operations uninvertible – after a top layer has been applied in one of these blend modes, it is in some cases impossible to restore the appearance of the original (bottom) layer, even by applying a copy of the bottom layer in the same blend mode above both.

  • The Hue blend mode preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.
  • The Saturation blend mode preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.
  • The Color blend mode preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.
  • The Luminosity blend mode preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.

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

8 hours ago, lepr said:

The tool will be using a Hue-Chroma-Luminance colour model, not HSL, to calculate the result of changing hue, hence the change of more than just hue when inspecting the HSL values.

Thanks for the revelation. Now can Affinity to give the tool a proper name reflecting (no pun) what it actually does, maybe "The Psychedelic Perceptive Color Mixing Tool"?

Link to comment
Share on other sites

6 minutes ago, jdvoracek said:

 Now can Affinity to give the tool a proper name reflecting (no pun) what it actually does, maybe "The Psychedelic Perceptive Color Mixing Tool"?

Or the "Won't do what you expect" tool.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

2 hours ago, jdvoracek said:

Thanks for the revelation. Now can Affinity to give the tool a proper name reflecting (no pun) what it actually does, maybe "The Psychedelic Perceptive Color Mixing Tool"?

It is not psychedelic at all. 

The Luma/Chroma model is what Adobe Photoshop uses (as industrial gold standard) since ages for blend modes hue, saturation, color, lightness (all named kind of misleading), and Affinity is 100% compatible in this respect.

The simple trick: when replacing hue, the blend mode „hue“ preserve perceived brightness, accepting changes in numeric lightness values. Unfortunately this leads to perceived color changes as documented in answers above.

So key lessons learned:

  • hue does not mean HSL is used.  complaints about unexpected HSL values are wrong interpretation (assuming HSL model)
  • The color replacement brush works technically as designed, but poor naming and documentation may lead to customer frustration.

 

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

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.