Answers for "color picker js"

1

color picker in js

//    color picker function;
    var colorCode = '#000',
        alpha = '00';
    function colorPickerFunc(target, colorActive) {
        colorActive ? (function () {
            colorPicker.disabled = false;
            colorAlpha.disabled = false;
            colorPicker.oninput = function () { genareateColorFunc(this.value, colorAlpha.value) }
            colorAlpha.oninput = function () { genareateColorFunc(colorPicker.value, this.value ) }
            // genarate color function;
            function genareateColorFunc(colorCode, alpha) {
                colorCode = colorCode+ alpha;
                console.log(colorCode);                
            }

        })() : (function () {
            colorPicker.disabled = true;
            colorAlpha.disabled = true;
        })();
Posted by: Guest on August-29-2021
0

color picker js

<input type="color" value="#ff0000">
Posted by: Guest on August-19-2021

Browse Popular Code Answers by Language