Ok. So you can supply your palette using a TBGRAPalette object (unit BGRAPalette). You can add your color using AddColor.
Then you can use a TBGRAColorQuantizer object (unit BGRAColorQuantization). Create it using your palette as a parameter.
With ApplyDitheringInplace, it replaces the colors directly. Otherwise GetDitheredBitmap will return a new bitmap.