In TIMViewer:
1. Convert TIM to BMP using Convert>toBMP
2. Edit BMP palette as you wish in your favourite graphic tool
3. Save BMP preserving the 256 color format
4. Go back to TIM Viewer
5. Open BMP with your texture
6. Convert>BMP to TIM
7. Now you have working TIM file
-You say it's 256 palette, therefore the only TIM containing 256 colors is 8BPP
So look at uint16 at 0x12- It's number of CLUT palettes. If your texture is only one CLUT, then just after the count a 512 bytes of CLUT data is. Therefore:
8. Copy paste from the same location the converted TIM from your BMP over the TIM you want to edit palette.
(copy 512 bytes starting from 0x20+(CLUT*512) to the same location in your final TIM texture OR if the initial texture has only one palette, then always copy from 0x20 from custom image to 0x20+(CLUT*512) in your final texture)