### Method

# Gimp Image pick_color

#### Declaration [src]

    gboolean
    gimp_image_pick_color (
      GimpImage* image,
      gint num_drawables,
      const GimpItem** drawables,
      gdouble x,
      gdouble y,
      gboolean sample_merged,
      gboolean sample_average,
      gdouble average_radius,
      GimpRGB* color
    )

#### Description [src]

Determine the color at the given coordinates

This tool determines the color at the specified coordinates. The returned color is an RGB triplet even for grayscale and indexed drawables. If the coordinates lie outside of the extents of the specified drawables, then an error is returned. All drawables must belong to the image and be of the same type. If only one drawable is given and it has an alpha channel, the algorithm examines the alpha value of the drawable at the coordinates. If the alpha value is completely transparent (0), then an error is returned. With several drawables specified, the composite image with only these drawables is used. If the sample_merged parameter is TRUE, the data of the composite image will be used instead of that for the specified drawables. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawables are ignored.

#### Parameters

`num_drawables` | `gint`
| The number of drawables.
`drawables` | An array of `None`
| The drawables to pick from.
| The length of the array is specified in the `num_drawables` argument.
| The data is owned by the caller of the function.
`x` | `gdouble`
| X coordinate of upper-left corner of rectangle.
`y` | `gdouble`
| Y coordinate of upper-left corner of rectangle.
`sample_merged` | `gboolean`
| Use the composite image, not the drawables.
`sample_average` | `gboolean`
| Average the color of all the pixels in a specified radius.
`average_radius` | `gdouble`
| The radius of pixels to average.
`color` | `GimpRGB`
| The return color.
| The argument will be set by the function.
| The data is owned by the caller of the function.

#### Return value

Returns: | `gboolean`
| TRUE on success.