I follow your suggestion last time and create the custom shader and palette.
Now it's working! Thanks a lot!
But now I encounter the new problem.
Every time when I change the sprite at run time, it seems lost the connection between atlas0 material and custom shader.
The sprite can't display correctly.
I have to set the custom shader again after I change the sprite.
Do you have any suggestions?