def inxsearch(self, r, g, b):
        """Search for BGR values 0..255 and return colour index"""
        dists = (self.colormap[:, :3] - np.array([r, g, b]))
        a = np.argmin((dists * dists).sum(1))
        return a
Search for BGR values 0..255 and return colour index