New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

graycolorize

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graycolorize

replace grayscale with color from a colormap

Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

graycolorize

Replace grayscale with color from a colormap

Build Status

Usage:

var graycolorize = require('graycolorize');

graycolorize(pixels, colormap);

where pixels is an ndarray of pixels (e.g., loaded by get-pixels). colormap is a 256x4 ndarray of RGBA colors for each 256 grayscale colors to replace.

You can create the colormap yourself or call graycolorize.generateMap(hue, saturation) to generate one for you, with the given hue and saturation (0-1) from minimum to maximum brightness:

var colormap = graycolorize.generateMap(0.25, 0.5);

Example (see demo.js or run npm start):

screenshot

License

MIT

Keywords

color

FAQs

Package last updated on 14 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts