In general, colormaps only contain significant information for pseudo-color visuals, but even for other visual types, a colormap object is required in some circumstances.
There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with get_system()) is the default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in which GdkRGB works, retrieved with Gdk::rgb_get_colormap(). However, when using GdkRGB, it is not generally necessary to allocate colors directly. 
|  | 
| 
 Public Member Functions | 
| bool | alloc_color (Color& color, bool writeable=false, bool best_match=true) | 
|  | Allocates a single color from a colormap. 
 | 
| int | alloc_colors (ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle<bool>& success) | 
| void | free_color (Color& color) | 
| void | free_colors (Color& colors, int ncolors) | 
| Glib::RefPtr<const Screen> | get_screen () const | 
|  | Gets the screen for which this colormap was created. 
 | 
| Glib::RefPtr<Screen> | get_screen () | 
|  | Gets the screen for which this colormap was created. 
 | 
| Glib::RefPtr<const Visual> | get_visual () const | 
|  | Returns the visual for which a given colormap was created. 
 | 
| Glib::RefPtr<Visual> | get_visual () | 
|  | Returns the visual for which a given colormap was created. 
 | 
| const GdkColormap* | gobj () const | 
|  | Provides access to the underlying C GObject. 
 | 
| GdkColormap* | gobj () | 
|  | Provides access to the underlying C GObject. 
 | 
| GdkColormap* | gobj_copy () | 
|  | Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 
 | 
| void | query_color (gulong pixel, Color& result) | 
|  | Locates the RGB color in colormap corresponding to the given hardware pixel pixel . 
 | 
| virtual | ~Colormap () | 
| 
 Static Public Member Functions | 
| static Glib::RefPtr<Colormap> | create (const Glib::RefPtr<Visual>& visual, bool allocate) | 
| static Glib::RefPtr<Colormap> | get_system () | 
|  | Gets the system's default colormap for the default screen. 
 | 
| 
 Protected Member Functions | 
|  | Colormap (const Glib::RefPtr<Visual>& visual, bool allocate) | 
| 
 Related Functions | 
| (Note that these are not member functions.) 
 
 | 
| Glib::RefPtr<Gdk::Colormap> | wrap (GdkColormap* object, bool take_copy=false) |