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

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

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

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

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...
×
×
  • 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.