You can hold the can upside down and depress the button. It *should* quickly spray only the gas propellent inside and no paint! This is usually how you clean the nozzles.
Anyway....hold the button down until ALL the gas is expelled. Then you can take a cutting tool of some kind and cut the top off the can and pour the paint out. Note....you will probably contaminate the paint with metal flakes, so while I am suggesting a way to get at the paint, the quality of the paint may be diminished because of it. It's a lot of work just to get at the paint tho.
Seems like someone could match whatever color you're using tho.
Good luck