[Solved] Gap the color value to 255

I solved my problem using numpy.clip() that takes a matrix A where you then set a minimal value (Min) and a maximal value (Max) and export it to a matrix B where all below Min will take the value Min and all above Max will take the value Max

The Matrix A was set in np.int16 and the Matrix B in np.uint8

Thanks again to dvbridges