GaurangShukla / gredient-generator

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.

Home Page:https://gaurangshukla.github.io/gredient-generator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

https://gaurangshukla.github.io/gredient-generator/


Languages

Language:HTML 38.0%Language:JavaScript 34.7%Language:CSS 27.3%