This function sets the color table in JSON format for a specified band of a raster object.


raster ST_SetColorTable(raster rast, integer band_sn, cstring clb);


Parameter Description
rast The raster object.
band_sn The sequence number of the band, which starts from 0.
clb The color table in JSON format. For more information, see the description of the ST_ColorTable function.


update rast set rast=ST_SetColorTable(rast,0, 

(1 row)