Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RGB to LCH Conversions
#1
I've coded a conversion of RGB to LCH  & tried to use Gimp to verify my numbers. However, there are discrepencies which I don't understand. 
e.g. 
#0009be     RGB(0,9,190):     Gimp LCH (21.3, 102.9, 300.7)    My LCH (23.4, 105.1, 305.7)

The ColorMath Online Colour converter & Converting Colours Converter agree with me, give or take some minor rounding errors.
Is Gimp doing some sort of Out of Gamut compensation? (I'm guessing at this because I'm a beginner in this area).
Reply
#2
Do you convert from RGB directly, or do you take in account gamma correction, and if so, how?
Reply
#3
I'm using sRGB values as input which is already 2.2 isn't it? I'm on a v steep learning curve here so it's v likely that I've missed something.
(sRGB -> XYZ -> LAB -> LCh using D65 white point)
Reply
#4
Your values agree with this.

Yes, gamma is 2.2 although technically it is linear (=0) for very small values but I don't think this matters here.

The answer is likely in the source code of the GEGL component of Gimp.
Reply
#5
Given 3 other converters agree with me, I think I'm happy to go with what I've got for my purposes (though we could all be creating the same error based on internet searches :-)).
Would you recommend that I progress this e.g. with a bug report, in case there's an issue within Gimp?
Reply
#6
(04-11-2023, 06:34 PM)NotEvenStickMen Wrote: Given 3 other converters agree with me, I think I'm happy to go with what I've got for my purposes (though we could all be creating the same error based on internet searches :-)).
Would you recommend that I progress this e.g. with a bug report, in case there's an issue within Gimp?

Well, at least you could get an answer about the difference.
Reply
#7
Thanks for your replies; much appreciated.
Reply


Forum Jump: