Skip to content

Vanilla JS Plugin change background color depending the mouse position

License

Notifications You must be signed in to change notification settings

mica-sirup/MousemoveBGColors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MousemoveBGColors

Vanilla JS Plugin change background color depending the mouse position

DEMO

USAGE :

// usage
 const bg = new MousemoveBGColors();

or

// with options
 const bg = new MousemoveBGColors({
       target : '.selector' //(string) element selector // default : 'body'
      ,transition : .2 //(float|int) transition duration // default: .09
      ,delay:2 //(float|int) transition delay // default: 0 
      ,center: [255, 255, 255] //(array) rgb color in the center // default : [168, 218, 218]
      ,topMiddle: [168, 218, 218]  //(array) rgb color in top middle // default : [168, 218, 218]
      ,leftMiddle: [236, 236, 236]  //(array) rgb color in the center // default : [168, 218, 218]
      ,rightMiddle: [255, 128, 63] //(array) rgb color in the center // default : [255, 128, 63]
      ,bottomMiddle: [204, 177, 218] //(array) rgb color in the center // default : [168, 218, 218]
      });

COPYRIGHT

Inspired by @JeWaVe Regis Portalez answer on StackOverflow

About

Vanilla JS Plugin change background color depending the mouse position

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published