code: def match_color_index(self, color):
          
          from jcvi.utils.webcolors import color_diff
          if isinstance(color, int):
              return color
          if color:
              if isinstance(color, six.string_types):
                  rgb = map(int, color.split(','))
              else:
                  rgb = color.Get()
              logging.disable(logging.DEBUG)
              distances = [color_diff(rgb, x) for x in self.xlwt_colors]
              logging.disable(logging.NOTSET)
              result = distances.index(min(distances))
              self.unused_colors.discard(self.xlwt_colors[result])
              return result
docs: Takes an "R,G,B" string or wx.Color and returns a matching xlwt
          color.