Takes an image and generates a low-poly background image based on its color palette.
npm install lowpoly-palette-cover




Generate a low-poly background image from another image's color palette.
---
Low-poly images are a nice way to inject some vibrant life to an otherwise boring design. If you want to generate them dynamically there are multiple ways to do it but none that can take an image and generate a low-poly background based on the image's color palette, until now!
```
yarn add lowpoly-palette-cover
`js
import LowpolyCover from 'lowpoly-palette-cover'
const opts = {
width: 500,
height: 500
};
// Get image as data URI
LowpolyCover.from('/path/to/image', opts).asSVG().then((svg) => { / do something with svg / })
LowpolyCover.from('/path/to/image', opts).asPNG().then((png) => { / do something with png / })
// Get the canvas element directly
LowpolyCover.from('/path/to/image').asCanvas().then((canvas) => { / do something with canvas / })
// Obtain image palette (output of node-vibrant)
LowpolyCover.from('/path/to/image').getPalette().then((palette) => { / do something with palette / })
``