• Stars
    star
    223
  • Rank 178,458 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 12 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

output rgb or hex colormaps

colormap Build Status

all colormap output

Usage

npm install colormap

let colormap = require('colormap')

let colors = colormap({
    colormap: 'jet',
    nshades: 10,
    format: 'hex',
    alpha: 1
})

API

list = colormap(options?)

Property Default Meaning
colormap 'jet' Color map name from the image above or a custom color scale β€” a sequence of {index, rgb} objects, where index is 0..1 number and rgb is a length 3/4 array with values for the color stop.
nshades 72 Number of colors in returned array, the minimum number depends on colormap.
format 'hex' 'hex' for #aabbcc, 'rgbaString' for rgba(255, 255, 255, 1), 'rgba' for [255, 255, 255, 1], 'float' for [1, 1, 1, 1].
alpha 1 Alpha range, can be an array with alpha values or just 2 values for start/end colors.

Credits

Color maps are inspired by matplotlib color scales, cmocean oceanographic colormaps, cosine gradients and others. Thanks to authors of these libs for their invaluable work.

More Repositories

1

pde-engine

A nodejs module for server side or browser computation of heat and wave equation.
JavaScript
34
star
2

fileswap-stream

Write to a writable file-stream that swaps out it's underlying file resources according to swapper and naming functions
JavaScript
12
star
3

droplets

Javascript / node.js wavefield generator website. Realtime droplets.
JavaScript
9
star
4

random-signal

Generate a pseudo-random signal stream for mocking Sensor data
JavaScript
6
star
5

matlabCode

Yes. A bunch of my matlab code
MATLAB
5
star
6

Masters-Thesis

Code for thesis
TeX
5
star
7

gitbin

JavaScript
4
star
8

bitpony

bitcoin machine learning trading platform
JavaScript
3
star
9

levelnet

Remote API bindings for LevelUP
JavaScript
3
star
10

cl-audio-programming

Common Lisp
2
star
11

emit.io

turn a node stream into an emitter on both ends like socket.io
JavaScript
2
star
12

r3bar

linux i3 system bar
Rust
2
star
13

mean-stream

running mean of streaming data
JavaScript
1
star
14

random-stream

Random ASCII source stream for experimentation and testing. Trivial, silly and sometimes useful.
JavaScript
1
star
15

i8yourtracks

JavaScript
1
star
16

fin

Configurable financial tracking utility
Go
1
star
17

nsda

A set of node.js services for seismic data aquisition
JavaScript
1
star
18

SacIO

SAC reading and writing for the Julia programming language
Julia
1
star
19

xcom

JavaScript
1
star
20

montreal-js

Presentation material for montreal-js
JavaScript
1
star
21

callc

find function usage in javascript source code
JavaScript
1
star
22

MultiViewer

A Linux (as of yet) app that lets you cycle and edit views of between 1 and 5 files at a time.
Python
1
star
23

danger-mouse

state mutating server for stress testing your monitoring setup
Go
1
star
24

eye-of-git

watch-events for changes to head in specified git branches
JavaScript
1
star