How does Lightroom group colors inside the HSL panel?

by Selim   Last Updated August 10, 2018 13:18 PM

I am working on a small application that would allow the same functionality as the Lightroom HSL Panel:

Lightrooms HSL Panel

I would like my application to behave very similarly to how Lightroom does. Therefore I grouped colors that are similar in their hue values and I've come up with the following groups:

enter image description here

However, so far I am not quite happy with the results that I get by adjusting the HSL values of these groups. I have left out merged purple and magenta for now since they are the groups I struggle with the most.

So, my question is: Are there any experiments that analyze or even official documents that mention how Lightroom does this grouping? If not how could I adjust and improve the ranges I have so far?



Answers 2


I did a fairly in depth analysis of the black and white conversion tool in Photoshop back when they released it in CS3. Its only six color bands, but it might give you some insight into how their suite thinks about color.

What I determined is that while the sliders are located at 𝛕/6 increments around the polar grid, each one has an influence of 𝛕/3. The red slider, for example, is centered on 0° but has a range from -60° to 60° with a decreasing influence over a pixel as its hue moves away from 0°.

For example, say a pixel's hue is located at 15°, which is 1/4 of the way between Red and Yellow. So it (essentially) calculates the pixel adjusted by the red settings, and the pixel adjusted at the yellow settings, then blends the results 75% red and 25% yellow.

I haven't done the leg work to figure out exactly how that blending is done for Hue and Saturation, but their exact algorithm is probably patented so you wouldn't be able to use it anyway.

LightBender
LightBender
August 10, 2018 14:25 PM

I'm not sure what your approach to the problem has been so far - so this may or (more likely) may not be of any use/interest.

If I was faced with this problem, I'd create a source image (or images) to use as input, containing simple blocks of pixels of as many practicable combinations of RGB (or whatever mode you want to work in) values.

I'd then create a set of output images for each slider in turn - where only that slider's value was changed (and all the others were left at their default position). Each set would contain as many steps along the slider's range as practicable - the more the better - but, obviously, also more work.

I'd then analyse the differences between the source and output images to figure out how LR is manipulating each pixel.

It should then be possible to identify which colours are affected by which slider(s) and how the value of the slider feeds into the calculation for each output pixel.

dav1dsm1th
dav1dsm1th
August 10, 2018 20:34 PM

Related Questions




How does Saturation in Lightroom work?

Updated April 24, 2015 21:07 PM