How do I remove unwanted colour from the palette from a Raster via the PyQGIS API? For example, remove black from the palette. It works manually within Layer Properties -> Symbology -> Band Rendering -> Paletted.
I have looked in 3.10 API docs but can't see how this is done.