title: How do I 'logarize' my spectrogram output?
body: <p>I'm building a spectrogram for some audio files that takes dB values for each bin as an array and visualizes them as brightness in a particular color. However, the output color is far too bright for values that should be basically invisible (-84dB). This makes me think my arrays need to be made more logarithmic in color processing.</p>
  
  <p>How can I acomplish this to make the colors more perceptually accurate?</p>
  
  <p>The spectrogram's input arrays something looks like </p>
  
  <p><code>[-1.007509747, -0.7208286419, -0.6967760266, -0.6406339168, -0.6272313747]</code></p>
  
  <p>and the rgb value of each bins pixels is determined through a hscToRgb function </p>
  
  <p><code>rgb = hsvToRgb(.25, 1-Math.abs(v), 1-Math.abs(v));</code></p>
  
  <p>where the last two inputs determine color intensity and brightness.</p>