title: how to use colormap on javascript
body: <p>I need to have a colormap on my javascript page.
  I am using Flask for server side (written in python).
  I have a javascript file that requires colormap module (installed using &quot;npm install colormap&quot;), for rendering colormaps on the client side.
  I tried to import it from my javascript file index.js</p>
  <pre><code>var colormap = import(&quot;colormap&quot;);
  </code></pre>
  <p>which I got the error:</p>
  <pre><code>index.js:2 Uncaught (in promise) TypeError: Failed to resolve module specifier 'colormap'
      at index.js:2
  </code></pre>
  <p>and I also tried:</p>
  <pre><code>let colormap = require('colormap')
  </code></pre>
  <p>and I got the error require is not defined.</p>
  <p>how can I solve it?
  I am trying to import the js file with colormap directly into my html (so the javascript file will have reference), but I cant find what file should I import.</p>