gdkRgbFindColor {RGtk2} | R Documentation

## gdkRgbFindColor

### Description

`colormap` should be the colormap for the graphics context and drawable you're using to draw. If you're drawing to a `GtkWidget`, call `gtkWidgetGetColormap`.

### Usage

    gdkRgbFindColor(colormap, color)

### Arguments

``colormap`` | a `GdkColormap`
``color`` | a `GdkColor`

### Details

`color` should have its `red`, `green`, and `blue` fields initialized; `gdkRgbFindColor` will fill in the `pixel` field with the best matching pixel from a color cube. The color is then ready to be used for drawing, e.g. you can call `gdkGCSetForeground` which expects `pixel` to be initialized.

In many cases, you can avoid this whole issue by calling `gdkGCSetRgbFgColor` or `gdkGCSetRgbBgColor`, which do not expect `pixel` to be initialized in advance. If you use those functions, there's no need for `gdkRgbFindColor`.

### Author(s)

Derived by RGtkGen from GTK+ documentation

[Package RGtk2 version 2.20.36.3 Index]