How to use the colormap/colorScales.js function in colormap

To help you get started, we’ve selected a few colormap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glslify / glsl-colormap / bin / build.js View on Github external
#!/usr/bin/env node
var data = require('colormap/colorScales.js')
var colors = Object.keys(data)
var gen = require('../index.js')
var fs = require('fs')
var path = require('path')

var file = path.join(__dirname, '..', 'colors.json')
fs.writeFile(file, JSON.stringify(colors))
colors.forEach(function (name) {
  var file = path.join(__dirname, '..', name + '.glsl')
  fs.writeFile(file, gen(name, data[name]))
})

colormap

Great looking color maps

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis

Popular colormap functions