docstr: rgb - an RGB tuple (three 0.0-1.0 values)
  return an allocated gtk.gdk.Color
docstr_tok: ["rgb","-","an","RGB","tuple","(","three","0.0-1.0","values",")","return","an","allocated","gtk.gdk.Color"]
code: def rgb_to_gdk_color(self, rgb):
      """
      rgb - an RGB tuple (three 0.0-1.0 values)
      return an allocated gtk.gdk.Color
      """
      try:
          return self._cached[tuple(rgb)]
      except KeyError:
          color = self._cached[tuple(rgb)] = self._cmap.alloc_color(
              int(rgb[0] * 65535),
              int(rgb[1] * 65535),
              int(rgb[2] * 65535),
          )
          return color
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import warnings
  import gobject
  import gtk
  import pango
  import numpy
  import matplotlib
  from matplotlib import rcParams
  from matplotlib._pylab_helpers import Gcf
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase
  from matplotlib.cbook import warn_deprecated
  from matplotlib.mathtext import MathTextParser
  from matplotlib.transforms import Affine2D
  from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
label_desc: Use image node_id 2 for calling the GraphicsContextGDK obj's underlying member method code with example usage: obj.rgb_to_gdk_color(rgb) and returns: self, color