code: def to_rio(self):
          
          self.colors = (((self.colors * 1.0 - self.colors.min()) /
                          (self.colors.max() - self.colors.min())) * 255)
          return dict(zip(self.values, tuple(map(tuple, self.colors))))
docs: Converts the colormap to a rasterio colormap.