<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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