ekystra-A1 / gradient-from-image

Home Page:https://kartik1225.github.io/gradient-from-image-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Beatiful Gradiants from the Image

Install with npm

npm install gradient-from-image

How to use?

note: currently only works with promises

Basic usage

var grad = require("gradient-from-image")

const imgUrl = "https://picsum.photos/200/300?image=82";

grad.gr(imgUrl).then(gradient =>{
	// this will gives you array of gradients
	//change this is to element css el.background="` linear-gradient(${gradient})`"
	console.log(gradient);
});

See live demo and full documentation.

https://kartik1225.github.io/gradient-from-image-demo/

Modules that used in this pakage

About

https://kartik1225.github.io/gradient-from-image-demo


Languages

Language:JavaScript 100.0%