Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When C is decomposed it is diffrent from the color picker
#1
Version: GIMP 2.10.36

   

I have a simple image      2x2 RGB(54,58,83) and the color picker converts this to CIE LCH
L = 24.9% C =  16.2% H =  282.3°


if I do Colors → Components → Decompose [uncheck 'Decompose to layers' ] and look at the L C H images the RGB% are: 
L = 24.7% C = 8.2% H = 78.4% (78.4 * 3.6 = 282.24°)



L and H are pretty close, however C is 50% out - What am I doing wrong or misunderstanding or is this a bug?


and help or workaround much appreciated


   
   
   
Reply
#2
You are assuming that the maximum C is 100% but this is not true.  If you create the color #0B03FF you will see that its chroma is 130.4, so the maximum theoretical chroma value is higher that 100 and the mapping is between (0..100%) and (0..255) but between (0..max) and (0..255). And max could be 200 since the 130.4 is decomposed to 65.3% (and in the color selector you can push the C slider to 200 even if you are told that there is no corresponding RGB color).

Another clue for the (0..200) range of the chroma is given by the two animation on the Wikipedia page of the CIELab color model:

   
Reply
#3
(02-20-2024, 10:30 PM)Ofnuts Wrote: You are assuming that the maximum C is 100% but this is not true.  If you create the color #0B03FF you will see that its chroma is 130.4, so the maximum theoretical chroma value is higher that 100 and the mapping is between (0..100%) and (0..255) but between (0..max) and (0..255). And max could be 200 since the 130.4 is decomposed to 65.3% (and in the color selector you can push the C slider to 200 even if you are told that there is no corresponding RGB color).

Another clue for the (0..200) range of the chroma is given by the two animation on the Wikipedia page of the CIELab color model:

Thanks for the reply Ofnuts.  I'm not questioning Gimps C* calculations - it is the inconsistency between the C* in the color picker Vs the decomposed C* 

Are you saying I just have to double the decomposed value?
Reply
#4
(02-20-2024, 11:35 PM)jarj Wrote:
(02-20-2024, 10:30 PM)Ofnuts Wrote: You are assuming that the maximum C is 100% but this is not true.  If you create the color #0B03FF you will see that its chroma is 130.4, so the maximum theoretical chroma value is higher that 100 and the mapping is between (0..100%) and (0..255) but between (0..max) and (0..255). And max could be 200 since the 130.4 is decomposed to 65.3% (and in the color selector you can push the C slider to 200 even if you are told that there is no corresponding RGB color).

Another clue for the (0..200) range of the chroma is given by the two animation on the Wikipedia page of the CIELab color model:

Thanks for the reply Ofnuts.  I'm not questioning Gimps C* calculations - it is the inconsistency between the C* in the color picker Vs the decomposed C* 

Are you saying I just have to double the decomposed value?

Yes, you double the value. 

It's not an "inconsistency".  It is just that the C range isn't the 0..100 you assumed it was. Otherwise the Hue layer that maps 0..360 to 0..255 would also be an inconsistency, right? Big Grin
Reply
#5
(02-21-2024, 06:12 AM)Ofnuts Wrote:
(02-20-2024, 11:35 PM)jarj Wrote:
(02-20-2024, 10:30 PM)Ofnuts Wrote: You are assuming that the maximum C is 100% but this is not true.  If you create the color #0B03FF you will see that its chroma is 130.4, so the maximum theoretical chroma value is higher that 100 and the mapping is between (0..100%) and (0..255) but between (0..max) and (0..255). And max could be 200 since the 130.4 is decomposed to 65.3% (and in the color selector you can push the C slider to 200 even if you are told that there is no corresponding RGB color).

Another clue for the (0..200) range of the chroma is given by the two animation on the Wikipedia page of the CIELab color model:

Thanks for the reply Ofnuts.  I'm not questioning Gimps C* calculations - it is the inconsistency between the C* in the color picker Vs the decomposed C* 

Are you saying I just have to double the decomposed value?

Yes, you double the value. 

It's not an "inconsistency".  It is just that the C range isn't the 0..100 you assumed it was. Otherwise the Hue layer that maps 0..360 to 0..255 would also be an inconsistency, right? Big Grin
fair enough, except there is in the range 0..255 every possible C value could simply be decomposed as it is displayed in the color picker.  

Failing that maybe a note/warning in the documentation and on the decompose menu option to inform users what to expect in the output files.  

And/or the filename generated could have "Cx0_5" instead of "C" and "Hx3_6" instead of "H" to really spell it out for the beginners like me

thanks for your help Ofnuts
Reply


Forum Jump: