source: gs3-extensions/mars-src/trunk/src/colormap/gen-heatmap.js@ 34373

Last change on this file since 34373 was 34372, checked in by davidb, 4 years ago

NodeJS code to generate a JSON heatmap to be used with WaveSurferJS

  • Property svn:executable set to *
File size: 315 bytes
Line 
1#!/usr/bin/env node
2
3const colormap = require('colormap');
4
5const colors = colormap({
6 colormap: 'hot',
7 nshades: 256,
8 format: 'float'
9 });
10
11const fs = require('fs');
12
13fs.writeFile('hot-colormap.json',
14 JSON.stringify(colors),
15 function(err, result) {
16 if(err) console.log('error', err);
17 });
Note: See TracBrowser for help on using the repository browser.