Gimp.Image.prototype.select_color

function select_color(operation: Gimp.ChannelOps, drawable: Gimp.Drawable, color: Gimp.RGB): Boolean {
    // Gjs wrapper for gimp_image_select_color()
}
  

Create a selection by selecting all pixels (in the specified drawable) with the same (or similar) color to that specified.

This tool creates a selection over the specified image. A by-color selection is determined by the supplied color under the constraints of the current context settings. Essentially, all pixels (in the drawable) that have color sufficiently close to the specified color (as determined by the threshold and criterion context values) are included in the selection. To select transparent regions, the color specified must also have minimum alpha.

This procedure is affected by the following context setters: Gimp.context_set_antialias, Gimp.context_set_feather, Gimp.context_set_feather_radius, Gimp.context_set_sample_merged, Gimp.context_set_sample_criterion, Gimp.context_set_sample_threshold, Gimp.context_set_sample_transparent.

In the case of a merged sampling, the supplied drawable is ignored.

Since 2.8

operation

The selection operation.

drawable

The affected drawable.

color

The color to select.

Returns

TRUE on success.