Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

How do I quickly change the colour of certain pixels across an image?


Recommended Posts

I have large images with pixel shapes (representing cells) and each cell type has a certain colour (6 in total, plus black background). 

I need to rapidly colour-test different colours to find the best combination for visibility. 

I have not been able to find a solution anywhere, as most such approaches are about defining a recognisable shape and then altering colours - this is about changing many 'cells' across a large image in one go. 

Thanks

Link to comment
Share on other sites

Two ways I am aware of:

1 - Menu Select > Select colour… (the bottom one in that section). Now click and drag on the colour you want to select. All pixels of the colour will be in an actual selection with those marching ants. Now use any adjustment layer you prefer to change the colour.

2 - Use an HSL adjustment and use the colour picker. Click on one of the solid colours below the colour wheel and use the picker to set it to that colour which you want to change. Then dial in the colour you want it to be via the slider. Move those 4 control points inside the wheel to narrow down/feather the selected colour.

1.jpg

2.jpg

Link to comment
Share on other sites

@user_0815thanks so much for taking the time. I think both approaches seem to partially work, but ideally i need to change the colours to a specific HEX code. This doesn't seem to be possible with HSL alteration. 

Do you mind explaining exactly how I would do that with the first approach, after I have selected the colours? I click 'apply' but then I can't find a way to actually change to a specific colour. Thanks again

image.thumb.png.18a532ff6da964761cca87c49df418dc.png

Link to comment
Share on other sites

If you can make a good pixel selection of all of them, then you could set the color you want in the Color panel, choose an appropriate brush like a basic round brush, set a large brush size, and paint over the entire canvas. It would be limited to your selection.

-- Walt

Desktop:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 
Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
        Affinity Photo 1.10.6 (.1665) and 2.0..3  and 2.0.3.1670 beta/ Affinity Designer 1.10.6 (.1665)  and 2.0.3 and 2.0.3.1670 beta / Affinity Publisher 1.10.6 (.1665)  and 2.0.3 and 2.0.3.1670 beta
iPad Pro M1, 12.9", iPadOS 16.3, Apple Pencil 2, Magic Keyboard

      Affinity Photo 1.10.6 and 2.0.3 / Affinity Designer 1.10.6 and 2.0.3 / Affinity Publisher 2.0.3

Link to comment
Share on other sites

28 minutes ago, kicka11 said:

Do you mind explaining exactly how I would do that with the first approach, after I have selected the colours? I click 'apply' but then I can't find a way to actually change to a specific colour.

After making the selection just use Edit > Fill and select the (Hex) colour you want

Link to comment
Share on other sites

Put your blobs on separate layers then put a fill layer inside each so that can be changed as desired to specific hex values

HexBlobs.afphoto

Microsoft Windows 10 Home, Intel i7-9750H CPU @ 2.60GHz, 16 GB RAM, 500GB SSD, 1TB Whirlygig, NVIDIA GeForce RTX 2060
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

2 hours ago, kicka11 said:

@user_0815thanks so much for taking the time. I think both approaches seem to partially work, but ideally i need to change the colours to a specific HEX code. This doesn't seem to be possible with HSL alteration. 

Do you mind explaining exactly how I would do that with the first approach, after I have selected the colours? I click 'apply' but then I can't find a way to actually change to a specific colour. Thanks again

image.thumb.png.18a532ff6da964761cca87c49df418dc.png

With the HSL Method I don't know a precise way. Only a work-around by using the "Info" panel. Place a sample point on the blob and read what HEX colour it is. Change the HSL slider until it matches what you need.

With the second method I would do it non-destructively like this:

1. select the colour like you did. Klick Apply.

2. Create a new FILL-layer: Menu Layer > New Fill Layer and then hit the Mask icon. (With this, you can change this later very quickly.)

3. Click on the fill layer and apply the colour you need in the Colour panel.

You can skip number 2. if you only want to change the colour once. However, with a new layer you can change the colour later much quicker because you don't need to do the selection (1.) again.

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

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.