<sect2 id="using-sidebar-colors">
<title>Colors</title>

    <para>
        The colors sidebar has two sub tabs <guilabel>Color</guilabel> and <guilabel>ICC Profile</guilabel>. Here are more details about <link linkend="using-iccprofile">Color Management</link>
    </para>

    <sect3 id="using-histogramviewer">
    <title>Histogram Viewer</title>

        <anchor id="histogramviewer.anchor"/>

        <para>
            The histogram for an image shows the amount of each color that is present and their different amplitudes within the image. If your photograph has a color cast you might be able to see what is wrong by looking at the histogram.
        </para>

        <para>
            The Histogram Viewer shows the statistical distribution of color values in the current image. It is purely informational: nothing you do with it will cause any change to the image. If you want to perform a histogram based color correction, use for example Color Balance, Levels Adjust or Curves Adjust in the Image Editor.
        </para>

        <para>
            <inlinemediaobject>
                <imageobject>
                    <imagedata fileref="&path;using-sidebar-histogramview.png" format="PNG" />
                </imageobject>
            </inlinemediaobject>
        </para>

        <para>
            An image can be decomposed into <guilabel>Red</guilabel>, <guilabel>Green</guilabel> and <guilabel>Blue</guilabel> color channels. <guilabel>Alpha</guilabel> channel is a Layer in the image that supports transparency (like PNG or &GIF; images). Each channel supports a range of intensity levels from 0 to 255 (integer valued). Thus, a black pixel is encoded by 0 on all color channels; a white pixel by 255 on all color channels. A transparent pixel is encoded by 0 on the alpha channel; an opaque pixel by 255.
        </para>

        <para>
            The Histogram Viewer allows you to view each channel separately:

            <itemizedlist>

                <listitem><para>
                    <guilabel>Luminosity</guilabel>: shows the distribution of brightness values.
                </para></listitem>

                <listitem><para>
                    <guilabel>Red</guilabel>, <guilabel>Green</guilabel>, <guilabel>Blue</guilabel>: show the distribution of intensity levels for the Red, Green, or Blue channels respectively.
                </para></listitem>

                <listitem><para>
                    <guilabel>Alpha</guilabel>: shows the distribution of opacity levels. If the layer is completely opaque or completely transparent, the histogram will consist of a single bar on the left or right edge.
                </para></listitem>

                <listitem><para>
                    <guilabel>Colors</guilabel>: shows the <guilabel>Red</guilabel>, <guilabel>Green</guilabel>, and <guilabel>Blue</guilabel> histograms superposed, so that you can see all of the color distribution information in a single view.
                </para></listitem>

            </itemizedlist>

        </para>

        <para>
            With the <guilabel>Scale</guilabel> option you can determine whether the histogram will be displayed using a linear or logarithmic Y axis. For images taken with a digital camera, the <guilabel>Linear</guilabel> mode is usually the most useful. However, for images that contain substantial areas of constant color a <guilabel>Linear</guilabel> histogram will often be dominated by a single bar. In this case a <guilabel>Logarithmic</guilabel> histogram will be more useful.
        </para>

        <para>
            You can restrict the analysis of the <guilabel>Statistics</guilabel> field shown at the bottom of the dialog to a limited range of values if you wish. You can set the range in one of two ways:

            <itemizedlist>

                <listitem><para>
                    Click and drag the pointer across the histogram display area, from the lowest level to the highest level of the range you want.
                </para></listitem>

                <listitem><para>
                    Use the spin button entries below the histogram area. Left entry is bottom of range and right entry is top of range.  
                </para></listitem>

            </itemizedlist>

        </para>

        <para>
            The statistics shown at the bottom of the Histogram Viewer describe the distribution of channel values, restricted to the selected range. These are:

        <itemizedlist>

            <listitem><para>
                The number of pixels in the image.
            </para></listitem>

            <listitem><para>
                The number whose values fall within the selected range.
            </para></listitem>

            <listitem><para>
                The mean.
            </para></listitem>

            <listitem><para>
                The standard deviation.
            </para></listitem>

            <listitem><para>
                The median of the selected histogram portion.
            </para></listitem>

            <listitem><para>
                The percentage whose values fall within the selected range.
            </para></listitem>

            <listitem><para>
                The color depth of the image.
            </para></listitem>

            <listitem><para>
                Alpha channel in the image.
            </para></listitem>

            <listitem><para>
                The source of the histogram, either <guilabel>Full Image</guilabel> or <guilabel>Image Region</guilabel> if you have selected an area of the image in the Editor.
            </para></listitem>

        </itemizedlist>

        </para>

    </sect3>

    <sect3 id="using-histogram">
    <title>How To Use an Histogram</title>

        <para>
            Histograms are a graphical means to assess the accuracy of an image shown on the screen. The graph represents the 3 regions of the photograph brightness:

            <itemizedlist>

                <listitem><para>
                    (1) : the shadows-tone on the left.
                </para></listitem>

                <listitem><para>
                    (2) : the middle-tone in the middle.
                </para></listitem>

                <listitem><para>
                    (3) : the highlights-tone on the right.   
                </para></listitem>

            </itemizedlist>

            <example>
                <title>An Image Histogram in All Colors Mode</title>
                <screenshot>
                    <screeninfo>An Image Histogram in All Colors Mode</screeninfo>
                    <mediaobject><imageobject>
                        <imagedata fileref="&path;using-sidebar-histogramdescription.png" format="PNG" />
                    </imageobject></mediaobject>
                </screenshot>
            </example>

            The distribution of the graph, where the spikes and bulges are clustered, indicates whether the image is too dark, too bright, or well-balanced. 
        </para>

        <para>
            With an under exposed photograph, the histogram will have a distribution of brightness that tends to be mostly on the left of the graph.

            <example>
                <title>An Under Exposed Photograph</title>
                <screenshot>
                    <screeninfo>An Under Exposed Photograph</screeninfo>
                    <mediaobject><imageobject>
                        <imagedata fileref="&path;using-sidebar-histogramsample1.png" format="PNG" />
                    </imageobject></mediaobject>
                </screenshot>
            </example>

            With an over exposed photograph, the histogram will have the bulge showing the brightness distributed mostly towards the right of the graph.

            <example>
                <title>An Over Exposed Photograph</title>
                <screenshot>
                    <screeninfo>An Over Exposed Photograph</screeninfo>
                    <mediaobject><imageobject>
                        <imagedata fileref="&path;using-sidebar-histogramsample3.png" format="PNG" />
                    </imageobject></mediaobject>
                </screenshot>
            </example>

            With a correctly exposed photograph, the histogram will have a distribution of brightness that will be most prominent near the center part of the graph.

            <example>
                <title>A Correctly Exposed Photograph</title>
                <screenshot>
                    <screeninfo>A Correctly Exposed Photograph</screeninfo>
                    <mediaobject><imageobject>
                        <imagedata fileref="&path;using-sidebar-histogramsample2.png" format="PNG" />
                    </imageobject></mediaobject>
                </screenshot>
            </example>

        </para>

        <para>
            Important: not all photographs have to exhibit this bulge in the center part of their histogram. Much depends on the subject of the photograph. In some cases, it might be appropriate for the histogram to show a peak at one end or the other, or both.
        </para>

        <para>
            The histogram is a reliable way of deciding whether or not a photograph is correctly exposed. Should the histogram show an over or under exposure, an <link linkend="editor-color-exposure">Exposure Correction Tool</link> should be used to fix the photograph.
        </para>

    </sect3>

</sect2>

<!--
Local Variables:
mode: sgml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
-->
