It's read only because SDL is the only thing that is allowed to change it.

If you want to manipulate the palette you'll need to do it some other way. If you have a look at the JEDI-SDL demos, you should find a palette example that should hopefully get you started.