Re: [Gimp-docs] Feedback on first pushed commits
On Fri, Apr 28, 2017 at 10:44:25AM -0400, Elle Stone wrote: > On 04/28/2017 04:35 AM, Marco Ciampa via gimp-docs-list wrote: > > >Is this right? > > > >src/menus/colors/desaturate/desaturate.xml:108(phrase) > > > >The shades of gray will be calculated as > > > > > > > > > > Lightness (HSL)) = (max(R,G,B) + > > min(R,G,B)) > > > > > > > > > > > > > > If you mean the formula for Lightness, it's correct: > > From 2.8 docs: > Lightness > > The graylevel will be calculated as > Lightness = ½ × (max(R,G,B) + min(R,G,B)) > > From posted 2.9 docs: > Lightness (HSL) > > The shades of gray will be calculated as > Lightness (HSL)) = ½ × (max(R,G,B) + min(R,G,B)) > > From Wikipedia (https://en.wikipedia.org): > In the HSL "bi-hexcone" model, lightness is defined as the average of the > largest and smallest color components (fig. 12c). > > From GIMP code (app/operations/gimpoperationdesaturate.c): > case GIMP_DESATURATE_LIGHTNESS: > /* This is the formula for Lightness in the HSL "bi-hexcone" >* model: https://en.wikipedia.org/wiki/HSL_and_HSV >*/ > while (samples--) > { > gfloat min, max, value; > > max = MAX (src[0], src[1]); > max = MAX (max, src[2]); > min = MIN (src[0], src[1]); > min = MIN (min, src[2]); > > value = (max + min) / 2; > > Not to be confused with LAB/LCH Lightness, which is calculated from XYZ, not > from RGB (http://brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html). Many thanks Elle! Sorry for the noise! Just a very minor typo: I think there is a spurious parenthesis after HSL ... bye -- Marco Ciampa I know a joke about UDP, but you might not get it. GNU/Linux User #78271 FSFE fellow #364 ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Re: [Gimp-docs] Feedback on first pushed commits
On 04/28/2017 04:35 AM, Marco Ciampa via gimp-docs-list wrote: Is this right? src/menus/colors/desaturate/desaturate.xml:108(phrase) The shades of gray will be calculated as Lightness (HSL)) = (max(R,G,B) + min(R,G,B)) If you mean the formula for Lightness, it's correct: From 2.8 docs: Lightness The graylevel will be calculated as Lightness = ½ × (max(R,G,B) + min(R,G,B)) From posted 2.9 docs: Lightness (HSL) The shades of gray will be calculated as Lightness (HSL)) = ½ × (max(R,G,B) + min(R,G,B)) From Wikipedia (https://en.wikipedia.org): In the HSL "bi-hexcone" model, lightness is defined as the average of the largest and smallest color components (fig. 12c). From GIMP code (app/operations/gimpoperationdesaturate.c): case GIMP_DESATURATE_LIGHTNESS: /* This is the formula for Lightness in the HSL "bi-hexcone" * model: https://en.wikipedia.org/wiki/HSL_and_HSV */ while (samples--) { gfloat min, max, value; max = MAX (src[0], src[1]); max = MAX (max, src[2]); min = MIN (src[0], src[1]); min = MIN (min, src[2]); value = (max + min) / 2; Not to be confused with LAB/LCH Lightness, which is calculated from XYZ, not from RGB (http://brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html). Best, Elle ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Re: [Gimp-docs] Feedback on first pushed commits
On Thu, Apr 06, 2017 at 02:22:06PM -0400, Elle Stone wrote: > On 04/05/2017 08:54 AM, Elle Stone wrote: > > > >Actually I'd suggest holding off on translating any of the color > >management menu pages as there are two more pages to write for the color > >management menu. These pages all go together, so likely I'll make minor > >changes to the "already done" pages while writing the "not yet done" pages. > > I made some changes to the XML, and many thanks to Julien for the feedback - > I think I have the indentation figured out now. > > I simplified the Enable Color Management page and finished the last two > items for the color management menu. So the Image/Color Management menu > pages are ready for translating if anyone is so inclined. Is this right? src/menus/colors/desaturate/desaturate.xml:108(phrase) The shades of gray will be calculated as Lightness (HSL)) = (max(R,G,B) + min(R,G,B)) -- Marco Ciampa I know a joke about UDP, but you might not get it. GNU/Linux User #78271 FSFE fellow #364 ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list