RSS/Atom feed Twitter
Site is read-only, email is disabled

green channel value in gimpviewrenderer.c

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

green channel value in gimpviewrenderer.c Elle Stone 07 Jun 10:54
  green channel value in gimpviewrenderer.c Alexandre Prokoudine 07 Jun 10:59
  green channel value in gimpviewrenderer.c Michael Natterer 07 Jun 11:00
   green channel value in gimpviewrenderer.c Elle Stone 07 Jun 11:10
Elle Stone
2016-06-07 10:54:54 UTC (almost 8 years ago)

green channel value in gimpviewrenderer.c

From curiosity, in this file
https://github.com/GNOME/gimp/blob/master/app/widgets/gimpviewrenderer.c, on line 160:

gimp_rgba_set (&green_color, 0.0, 0.94, 0.0, GIMP_OPACITY_OPAQUE);

Why is the green channel value for "&green_color" set to 0.94 rather than 1.0? Does this affect anything during editing? Or is this just a random default value?

The channel values for the other colors in the list are either 0.0 or 1.0.

Also, what are the functions in this file for? Why is the blue channel not used, but rather only the red and green channel?

Best, Elle

Alexandre Prokoudine
2016-06-07 10:59:43 UTC (almost 8 years ago)

green channel value in gimpviewrenderer.c

On Tue, Jun 7, 2016 at 1:54 PM, Elle Stone wrote:

From curiosity, in this file
https://github.com/GNOME/gimp/blob/master/app/widgets/gimpviewrenderer.c, on line 160:

gimp_rgba_set (&green_color, 0.0, 0.94, 0.0, GIMP_OPACITY_OPAQUE);

Why is the green channel value for "&green_color" set to 0.94 rather than 1.0? Does this affect anything during editing? Or is this just a random default value?

The channel values for the other colors in the list are either 0.0 or 1.0.

Also, what are the functions in this file for? Why is the blue channel not used, but rather only the red and green channel?

Create a layer with a mask.

In the layers dialog you will see black outline around the layer preview and white outline around mask preview.

Right-click, choose Show Layer Mask. The mask preview will get green outline.

Right-click, choose Disable Layer Mask. The mask preview will get red outline.

There you are.

Alex

Michael Natterer
2016-06-07 11:00:38 UTC (almost 8 years ago)

green channel value in gimpviewrenderer.c

On Tue, 2016-06-07 at 06:54 -0400, Elle Stone wrote:

 From curiosity, in this file 
https://github.com/GNOME/gimp/blob/master/app/widgets/gimpviewrendere r.c, on 
line 160:

gimp_rgba_set (&green_color, 0.0, 0.94, 0.0, GIMP_OPACITY_OPAQUE);

Why is the green channel value for "&green_color" set to 0.94 rather  than 1.0? Does this affect anything during editing? Or is this just a 
random default value?

The channel values for the other colors in the list are either 0.0 or 1.0.

Also, what are the functions in this file for? Why is the blue channel 
not used, but rather only the red and green channel?

These are just GUI colors, used for colored frames around previews, like in layer/mask active/visible/disabled.

0.94 probably looked better than pure green, this is unrelated to any image pixels.

Regards, Mitch

Elle Stone
2016-06-07 11:10:01 UTC (almost 8 years ago)

green channel value in gimpviewrenderer.c

Mitch and Alexandre - thanks very much! for explaining what those gimpviewrenderer colors are for.

Best, Elle