Jump to content

Color grading pixels only - preserving background


Recommended Posts

Hi all,

I'm new to the forum! I have searchied on the forum for a solution but I'm a newbie so I don't even know how to formulate my question properly. What I'm trying to do is the following:

I have a png file of a fractal triangle. The pixels in the png are all white and the background is transparent (in the picture below I have added a black background in Affinity Photo 2 so that the white pixles can be seen).

Next I would like to recolor the white dots only with a gradient ranging from light blue at the edges of the large triangle to black (or transparent) in the center of the large triangle.

How can I do this?

I have tried the gradient tool but I can't figure out how to do this. Reading different instructions on similar (?) topices I imagine that I want to have a gradient fill (light blue to black/transparent) while protecting the alpha so that only the white pixels are affected and not the background.

Any suggestions?

Br,
Fredrik

image.thumb.png.be78f4e47573114a413e754a531399e4.png

Link to comment
Share on other sites

Hi @Fredrik Ingvarson and welcome to the forum.

Use the Rectangle tool to create a rectangle with the same height and width as the triangle.
Select the Gradient tool, select the type and create the gradient and use it to create the fill of the rectangle.
In Studio Layers drag the rectangle layer onto the pixel layer with the triangles (onto the text area). 

 

 

MAC mini M4 | MacOS Sequoia 15.1.1 | 16 GB RAM | 256 GB SSD 
AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.2161)

Affinity Suite V 2.5.6 & Beta 2.6 (latest)
Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF

Ferengi Acquisition Rule No. 49: “A deal is a deal is a deal.”

Link to comment
Share on other sites

Even in APh I would use a vector representation of a Sierpinsky triangle as that offers overall easier handling, not only for applying gradients and the like but also for scaling up-/down etc.

sierpinsky-triangle.jpg.ba88a00d209724914a40eb58de9c3a7d.jpg

 

sier1.jpg.e02bd695d35086bb5846ca026bd897a5.jpg

sier2.jpg.d89dd2c6d6d29e633b17e319ae757b59.jpg

☛ 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, Komatös said:

Use the Rectangle tool to create a rectangle with the same height and width as the triangle.
Select the Gradient tool, select the type and create the gradient and use it to create the fill of the rectangle.
In Studio Layers drag the rectangle layer onto the pixel layer with the triangles (onto the text area). 

You could instead apply a Gradient Overlay effect to the pixel layer.

But neither your approach nor mine can, as far as I know, exactly match the request for a gradient that runs from the edges of the large triangle to the center. A radial gradient is possible, but it's not exactly correct for that request.

image.png.f87c81edadde668eaec7997446f4cd50.png

Perhaps breaking up the large triangle into 3 smaller triangles, meeting at the center of the large triangle, and applying linear gradients to each?

 

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

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.