Skip to content

Get the color midway between two array-formatted rgb or rgba values as a string.

License

Notifications You must be signed in to change notification settings

samliebl/color-midpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Color Difference

Get the color midway between two array-formatted rgb or rgba values as a string.

Installation

npm install color-midpoint

Usage

var colorMidpoint = require('color-midpoint');

// Blue: rgba(11, 92, 208, 1.0)
var blue = [11, 92, 208, 1.0];

// Red: rgba(252, 39, 42, 1.0)
var red = [252, 39, 42, 1.0];

var purple = colorMidpoint(blue, red);

console.log(purple);
// Expected result: `rgba(132, 66, 125, 0.9)`

License

MIT

Releases

No releases published

Packages

No packages published