def create_colormap_image(colormap_name: str, height=100) -> QImage: colormap = colormaps.calculate_numpy_brga_for(colormap_name) indices = np.zeros((len(colormap), height), dtype=np.int64) for i in np.arange(len(colormap), dtype=np.int64): indices[i, :] = np.repeat(i, height) return Spectrogram.create_image(indices, colormap, normalize=False)