colormap

WebJar for colormap

License

License

MIT
Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

colormap
Last Version

Last Version

2.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

colormap
WebJar for colormap
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/bpostlethwaite/colormap

Download colormap

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/colormap/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>colormap</artifactId>
    <version>2.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/colormap/
implementation 'org.webjars.npm:colormap:2.3.1'
// https://jarcasting.com/artifacts/org.webjars.npm/colormap/
implementation ("org.webjars.npm:colormap:2.3.1")
'org.webjars.npm:colormap:jar:2.3.1'
<dependency org="org.webjars.npm" name="colormap" rev="2.3.1">
  <artifact name="colormap" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='colormap', version='2.3.1')
)
libraryDependencies += "org.webjars.npm" % "colormap" % "2.3.1"
[org.webjars.npm/colormap "2.3.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : lerp jar [1.0.3,2)

Project Modules

There are no modules declared in this project.

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), 'rba' 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.

Versions

Version
2.3.1
2.3.0