https://github.com/samliebl/color-midpoint
Get the color midway between two array-formatted rgb or rgba values as a string.
https://github.com/samliebl/color-midpoint
color color-generator color-mixing color-palettes color-scheme colors palettes programmatic programmatic-color
Last synced: 5 months ago
JSON representation
Get the color midway between two array-formatted rgb or rgba values as a string.
- Host: GitHub
- URL: https://github.com/samliebl/color-midpoint
- Owner: samliebl
- License: mit
- Created: 2019-12-27T03:57:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-27T03:58:54.000Z (about 6 years ago)
- Last Synced: 2025-07-11T07:23:49.597Z (7 months ago)
- Topics: color, color-generator, color-mixing, color-palettes, color-scheme, colors, palettes, programmatic, programmatic-color
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Color Difference
Get the color midway between two array-formatted rgb or rgba values as a string.
## Installation
```sh
npm install color-midpoint
```
## Usage
```js
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