def rgb_to_gdk_color(self, rgb):
try:<EOL><INDENT>return self._cached[tuple(rgb)]<EOL><DEDENT>except KeyError:<EOL><INDENT>color = self._cached[tuple(rgb)] =self._cmap.alloc_color(<EOL>int(rgb[<NUM_LIT:0>]*<NUM_LIT>),int(rgb[<NUM_LIT:1>]*<NUM_LIT>),int(rgb[<NUM_LIT:2>]*<NUM_LIT>))<EOL>return color<EOL><DEDENT>
rgb - an RGB tuple (three 0.0-1.0 values)
return an allocated gtk.gdk.Color