Using the global color picker you can take color samples from your image, display their values in multiple ways and compare colors from different locations. The color picker is activated by pressing the icon. There are multiple parameters for controlling how the color picker works, whose settings remain in effect until you leave the darkroom mode.
Besides the global color picker described here there are also local color pickers in some of the modules (eg. tone curve). Global and local color pickers are different. The global color picker works in monitor color space and takes samples after the complete pixelpipe has been processed. The local color pickers run in the color space of the individual module, which is usually Lab; they reflect the input and output data of that specific module within pixelpipe.
The global color picker can be run in point or area mode. When in point mode only a small spot under your cursor is taken as a sample. In area mode you can draw a rectangle and darktable samples the area within that rectangle. The combobox to switch between point and area mode can also be used to toggle the mode of local color pickers.
If samples are taken in area mode, darktable will calculate mean, min and max color channel values. A combobox allows you to select which of those are displayed. For obvious statistical reasons mean, min and max are identical for the single sample of point mode.
A color swatch representing the sampled point or area is displayed. Numerical values are shown as well. As said before global color picker works in monitor RGB color space. You can also let darktable translate these numerical values into Lab color space. Beware that Lab values are approximated here; depending on monitor color profile there can be some deviations from the real values.
When the checkbox “restrict histogram to selection” is ticked, only the values of your selected area or point are taken into account by the main histogram at the top of the right hand panel (see Section 3.3.6, “Histogram”). This is a way to show which tonal values are present in a specific area.
The sampled colors in either area or point mode can be “stored” as live samples by pressing the “add” button. darktable will then show a color swatch and numerical values for each stored sample. You can once again select which numerical value (mean, min, max) is to be displayed and if this is to be done in RGB or Lab color space.
Newly created live samples are not locked. If you change your image the changes will be reflected in your live samples. Use this if you want see how changing parameters effects different parts of an image. Clicking on a live sample's color swatch locks it and a lock symbol is displayed. Further image changes will then no longer affect the sample. You can for example take two live samples from the same location and lock just one of them to provide a before and after sample comparison.
Live sample locations are indicated in your image if you check option “display sample areas on image”.