How can I make the live spectrogram that ffplay renders while playing audio use colours?
The showspectrum filter is what you're looking for.
To force ffplay to use colours:
ffplay -f lavfi "amovie=audio.m4a,asplit[a][out0];[a]showspectrum=color=intensity:slide=1[out1]"
outN
- non-documented output link names.
To generate video:
ffmpeg -i audio.m4a -lavfi showspectrum=color=magma:slide=1 spectrum.mp4