naj1024 / pyspectrum

Python based spectrum analyser with web UI and sdr input
MIT License
23 stars 5 forks source link

Edit default spectrum! #8

Closed Lucstay11 closed 1 year ago

Lucstay11 commented 1 year ago

Hi, I'm trying to change the map color and the default gradient to give it, for example, the theme "fosphor" when starting the server. I tried to modify the colourmaps.js, main.js, spectrum.js but without success... What should I do?

naj1024 commented 1 year ago

Spectrum.js under src/webUI/webroot has

// Colours this.colourIndex = 0; this.colourMap = colourMaps[this.colourIndex]; // map for spectrogram only

alternatively in colourmap.js reorder the map to give your prefered one at index zero. var colourMaps = [binary, binary_inverse, turbo, fosphor, viridis, inferno, magma, jet];