Skip to content

lijinke666/primary-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

primary-color

get image cover primary color js plugin

How To Use ?

  <script src="../lib/getPrimaryColor.js"></script>
  ...
  const primary = new primaryColor()
  primary.getPrimaryColor({
    cover: "./demo.jpg",        //your cover
    success(primaryColor) {
        console.log(primaryColor);
        document.body.style.backgroundColor = primaryColor
    },
    error(err) {
        console.log(err);
    }
})

Releases

No releases published

Packages

No packages published