@bencevans/color-array-average

1.0.2 • Public • Published

@bencevans/color-array-average

Calculate the average color given an array of CSS Hex Colors

Install

$ npm install --save @bencevans/color-array-average

Usage

const averageColor = require('@bencevans/color-array-average')

averageColor(['#00f', '#0f0', '#f00']) // => '#555555'
averageColor(['#121212', '#121212']) // => '#121212'

API

averageColor(colors : Array) : String

Returns CSS Hex string.

/@bencevans/color-array-average/

    Package Sidebar

    Install

    npm i @bencevans/color-array-average

    Weekly Downloads

    78

    Version

    1.0.2

    License

    GPL-3.0-or-later

    Unpacked Size

    2.35 kB

    Total Files

    4

    Last publish

    Collaborators

    • bencevans