Fredrik Ingvarson Posted July 17, 2023 Share Posted July 17, 2023 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 Quote Link to comment Share on other sites More sharing options...
Komatös Posted July 17, 2023 Share Posted July 17, 2023 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). Photo_H5XokUudME.mp4 Quote 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 More sharing options...
v_kyr Posted July 17, 2023 Share Posted July 17, 2023 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. Sierpinski-Triangle.afphoto Sierpinski-Triangle.svg Komatös 1 Quote ☛ 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 More sharing options...
walt.farrell Posted July 17, 2023 Share Posted July 17, 2023 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. Perhaps breaking up the large triangle into 3 smaller triangles, meeting at the center of the large triangle, and applying linear gradients to each? Quote -- 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 More sharing options...
Fredrik Ingvarson Posted July 18, 2023 Author Share Posted July 18, 2023 Thank you all for helping me! I used the method suggested by @Komatös and used an elliptical gradient. Now I have something I can work on. Thank you also for the other suggestions. It really helps! /Fredrik walt.farrell 1 Quote Link to comment Share on other sites More sharing options...
v_kyr Posted July 19, 2023 Share Posted July 19, 2023 sierpinski.mp4 Quote ☛ 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 More sharing options...
Recommended Posts
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.