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


Update: As suggested by one of the answers, I have done some experiments with a HSL color wheel loaded into Lightroom. I was surprised to see that the grouping is also based on Lightness in some cases. I was also partly expecting there to be an overlap in certain colors like yellow and green and I could confirm this.

The new ranges that I am now using are following: enter image description here

My program produces much better results already! :-)

up vote 1 down vote accepted

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.

  • 1
    Thanks! That's exactly what I did and I updated my answer to include my findings – Selim Aug 11 at 8:41

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.