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

LAB Interpolation for Gradients


Recommended Posts

Is there any plans to add CIE-LAB gradients for affinity? I've been playing around with them in Python and LAB-interpolated gradients look a lot better than RGB-interpolated gradients, especially for backgrounds and things like that. I looked through the SVG standard and SVG supports CIELAB interpolation, along with a few others. So is there any plans to add alternate gradient interpolations to Affinity designer? Or even a full LAB color space, like in Affinity Photo or photoshop? 

 

I added a photo for anyone that's interested (CIELAB on the left)

CIELAB example.png

Edited by yitzaklr@aol.com
L/R dyslexic
Link to comment
Share on other sites

Hello Yitzaklr,

welcome to the forum. First off I want to kindly suggest to change your forum name to something different than your email adress. Otherwise you will be swamped with spam mails over time.

Quote

Is there any plans to add CIE-LAB gradients for affinity?

You can already set the colour stops of a gradient with LAB values. In the colour selector choose 'LAB' sliders from the drop down at the top.

But I am not quite sure if this affects the way the gradients are calculated.

Cheers,
d.

Affinity Designer 1 & 2   |   Affinity Photo 1 & 2   |   Affinity Publisher 1 & 2
Affinity Designer 2 for iPad   |   Affinity Photo 2 for iPad   |   Affinity Publisher 2 for iPad

Windows 11 64-bit - Core i7 - 16GB - Intel HD Graphics 4600 & NVIDIA GeForce GTX 960M
iPad pro 9.7" + Apple Pencil

Link to comment
Share on other sites

4 hours ago, yitzaklr said:

I noticed the LAB color settings, but was wondering if there'd be any way to get deeper into it, like LAB filters and LAB gradients.

As dominik mentioned, you can already use LAB to set the gradient stops. Perhaps you could do an experiment with one gradient to compare an Affinity gradient using RGB, one using LAB, and the equivalent gradient from your Python program to see how they compare?

Also, of course, you could set your document to LAB when creating it (or later) and work entirely in that color representation, and see how the gradients (and filters) compare there.

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

  • 10 months later...
On 1/8/2021 at 7:13 AM, walt.farrell said:

As dominik mentioned, you can already use LAB to set the gradient stops. Perhaps you could do an experiment with one gradient to compare an Affinity gradient using RGB, one using LAB, and the equivalent gradient from your Python program to see how they compare?

I tried this and as far as I can tell the interpolation of the gradient colors is being done in RGB regardless of the color space used to set the gradient stops.

Link to comment
Share on other sites

On 11/26/2021 at 7:04 PM, G7495x said:

You can try altering the color space and see the difference in this tool... This would be one hell of an addition to Affinity. Please consider.

Which of four lines (the original plus the three lines I drew) is the most correct or incorrect?

466530082_ScreenShot2021-11-28at10_41_25AM.png.cdd71c2a40f2104311a2cdfc3a71d1c8.png

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

  • 2 years later...
On 11/28/2021 at 1:44 PM, Old Bruce said:

Which of four lines (the original plus the three lines I drew) is the most correct or incorrect?

466530082_ScreenShot2021-11-28at10_41_25AM.png.cdd71c2a40f2104311a2cdfc3a71d1c8.png

It depends on the Color Space model used to interpolate the gradient. Ideally we'd have an option to choose from multiple color spaces and newer Color Appearance Models (CAMs) such as OKLAB and CAM16, but even just CIELAB would be a great improvement over RGB. This should also be an option for transparency interpolation. Also Adobe has offered this functionality for a while..

The steps to compute this from an RGB base are roughly:

  1. Convert the gradient RGB colors into the new CAM space
  2. Linearly interpolate between the CAM colors to fill in the gradient
  3. Convert those new CAM colors back into RGB space

Affinity already has HSL sliders so it should be easy to at least implement HSL gradient interpolation.

Edited by evnb
Link to comment
Share on other sites

One option is to add an additional gradient stop color in that grayish "dead zone" (where color transitions between widely contrasting colors). This way you have greater control and get to choose whatever intermediate color (or path) you want, without it going grayish (if that's what you want). I suspect RGB is the blending mode, but haven't tested to know for sure.. 

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

This is one of the first search results on google for this topic even though the thread is archived. I just posted a similar feature request for V2: 

 

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.