Skip to content

kartik1225/gradient-from-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

 
 
 

Contributors