RGB to LCH Conversions - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: RGB to LCH Conversions (/Thread-RGB-to-LCH-Conversions) |
RGB to LCH Conversions - NotEvenStickMen - 04-11-2023 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). RE: RGB to LCH Conversions - Ofnuts - 04-11-2023 Do you convert from RGB directly, or do you take in account gamma correction, and if so, how? RE: RGB to LCH Conversions - NotEvenStickMen - 04-11-2023 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) RE: RGB to LCH Conversions - Ofnuts - 04-11-2023 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. RE: RGB to LCH Conversions - NotEvenStickMen - 04-11-2023 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? RE: RGB to LCH Conversions - Ofnuts - 04-11-2023 (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 :-)). Well, at least you could get an answer about the difference. RE: RGB to LCH Conversions - NotEvenStickMen - 04-11-2023 Thanks for your replies; much appreciated. |