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

How to find and replace font color?


Recommended Posts

Generally to do that you would have a text style applied with a colour set within the style and then you can change the colour from the text style.

It might be possible to use RegEX (Regular Expressions) to find a fonts colour attribute.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

1 hour ago, Giggly said:

I've tried Find and Replace using the RGB numbers in character fill but it doesn't find anything.

That works for me.

In the Find panel you click the cog icon for the Find field and choose Format:

image.png.cdda174e7bd743416c49c75ceb3fa036.png

Then in the Choose Format dialog:
image.png.4547fe69d7d996a8ed9b2f7c1a3466aa.png

which gives a Find value of (for my color choice):
image.png.daa71db7fb4ecf77770b4d7287baa906.png

Click Find, and a list of all the red text shows up, ready for replacement.

(firstdefence is right that using Text Styles would be better.)

-- 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

firstdefence: all of the text within the text box uses the "body style" but portions of the text are different colors. 

walt:  that is the exact process I have tried many times.  it finds words without a problem but not specific RGB number codes.

It did find instances once yesterday but I haven't been able to get it working since. 
 

Link to comment
Share on other sites

15 minutes ago, Giggly said:

that is the exact process I have tried many times.  it finds words without a problem but not specific RGB number codes.

Well, it found 255,0,0 for me. What are you trying, specifically?

Can you provide a sample document where it doesn't work, and the color you're trying to find?

-- 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

Interesting. That one doesn't work for me, either, Giggly.

I'll try to figure out what's different between your document and mine.

-- 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

I've just downloaded your file and had the same result as Walt, so, I deleted your text frame and text and did my own. I coloured a paragraph with R242 G175 B13 and did a format find and it found the format and when selecting replace changed that font colour to pink.

What it doesn't do is find paragraphs, or selected words with the same colour after the initial search, it seems to just stop at the first find and think that's it. even if you move it on it will not work after the first find.

After a bit of tweaking I found that the colour of the individual words and the second paragraph was off slightly: R242 G175 B11 and that's why it wouldn't pick up the rest of the words and paragraphs. After changing them to the correct colour format: R242 G175 B13 Find worked as expected.

In this document the last paragraph looks identical to the one above to a glancing eye but will not be selected as a find because the colour is: R242 G175 B11

Affinity Publisher find and replace text color tweaked.afpub

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

I found that if I select a red word with a specific RGB combination, right click and add to Swatches from fill, then find that swatch, it finds all the instances and lets me replace the color.

This is pretty ridiculous since selecting the swatch simply places the same HSL code I previously entered manually but find only works when selected using the swatch.

Link to comment
Share on other sites

  • Staff

@Giggly 

On 12/27/2019 at 6:15 PM, Giggly said:

I found that if I select a red word with a specific RGB combination, right click and add to Swatches from fill, then find that swatch, it finds all the instances and lets me replace the color.

I'm seeing the same behaviour with this document, as well as manually inputting RBG values into the Find function does not display any results.

However, if I change the fill of the text to None using the context toolbar, then re-input the same colour values through the same dialog and use the search function again, the text is found -

I'm not 100% certain of the reason behind this yet, but it may be due to how the text was created. Did you paste this text in from an external source? How did you set the Fill colour? (ie through the Colour Studio or through the Context Toolbar?)

Please Note: I am now out of the office until Tuesday 2nd April on annual leave.

If you require urgent assistance, please create a new thread and a member of our team will be sure to assist asap.

Many thanks :)

Link to comment
Share on other sites

  • Staff

Thanks for confirming that, I believe I've pinpointed the cause of this issue. If the text colour is set using the Waterfall (ie not inputting direct RGB values) then the Find function does not locate the text. This also happens if you manually set values for your text, then use the Waterfall selector in the Find and Replace dialog.

I'll log this bug with our developers now, in the meantime I recommend always inputting values for text colour when you wish to use this function - or alternatively you can use the 'recent' swatches method.

I hope this helps!

Please Note: I am now out of the office until Tuesday 2nd April on annual leave.

If you require urgent assistance, please create a new thread and a member of our team will be sure to assist asap.

Many thanks :)

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.