Skip to content

this is a simple gradient generator in js . I needed one for my flutter project , choosing the right gradient or pallet option is not easy so i added a generate random feature as well.

Notifications You must be signed in to change notification settings

GaurangShukla/gredient-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gredient-Generator


1- I've increased the use of "let" insted of "var" which increases the scope of treating variables in every scope possible.
  • let body = document.querySelector('body');
  • let colorPickers = document.querySelectorAll('.color-picker');
  • let colorPicker1 = document.querySelector('.color-picker__container1').firstElementChild;
  • let colorPicker2 = document.querySelector('.color-picker__container2').firstElementChild;
  • let anglePicker = document.querySelector('.js-angle');
  • let gradientCode = document.querySelectorAll('.js-gradient-code');
  • let rgbCode = document.querySelectorAll('.js-rgb-code');
  • let backgroundCopy = document.querySelector('.js-background-copy');
2- var fixes the scope and bounds the variables.
3- const fixes the value and limits the sope of function.
4- let allows user to change the existing value of the variable and assign new one in the next function.

About

this is a simple gradient generator in js . I needed one for my flutter project , choosing the right gradient or pallet option is not easy so i added a generate random feature as well.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published