1 // color picker function;
2 var colorCode = '#000',
3 alpha = '00';
4 function colorPickerFunc(target, colorActive) {
5 colorActive ? (function () {
6 colorPicker.disabled = false;
7 colorAlpha.disabled = false;
8 colorPicker.oninput = function () { genareateColorFunc(this.value, colorAlpha.value) }
9 colorAlpha.oninput = function () { genareateColorFunc(colorPicker.value, this.value ) }
10 // genarate color function;
11 function genareateColorFunc(colorCode, alpha) {
12 colorCode = colorCode+ alpha;
13 console.log(colorCode);
14 }
15
16 })() : (function () {
17 colorPicker.disabled = true;
18 colorAlpha.disabled = true;
19 })();