I start with a bunch of 1-bit geotiff files that I had to convert to 8-bit RGB tiff files to use with GdalGDAL. Then I tried to set borders to red (content is in black and white so I can't use those) and do
gdal_translate -a_nodata '200 0 0' -of vrt red.tiff nodata.vrt
gdalbuildvrt -srcnodata '200 0 0' -vrtnodata '200 0 0' -hidenodata -addalpha nodata.vrt trans.vrt
gdal2tiles.py -a "200,0,0" trans.vrt ...
gdal_translate -a_nodata '200 0 0' -of vrt red.tiff nodata.vrt
gdalbuildvrt -srcnodata '200 0 0' -vrtnodata '200 0 0' -hidenodata -addalpha nodata.vrt trans.vrt
gdal2tiles.py -a "200,0,0" trans.vrt ...
But I am only able to hide nodata if it is in grayscale(ex. rgb(200,200,200)) I think the color information is just lost in the gdal_translate process. Is there any way to verify what happened and make gdal work with nodata that has custom colors?