Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Color picker script

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #271100
    Dest
    Participant

    Hello , i have been searching for a color picker script that saves the picked color with cookies or local storage but i can’t seem to find one. I want something like this one here https://www.jqueryscript.net/demo/Flat-HTML5-Palette-Color-Picker-For-jQuery-colorPick-js/ with a pop up , i tried adding that one but i realised that script doesn’t save the picked color , it just shows the recent picked color and i can’t add the picked color to any text because i can’t find the line where i can put the class. Do you guys know a good color picker script that saves preference and is somewhat similar to the script from that link ?

    #271112
    JeroenR
    Participant

    The script you refer to has a callback function with info about the chosen color.
    In that function you could save the chosen color to a cookie or local storage yourself.

    This is the callback function:

                'onColorSelected': function() {
                    console.log("The user has selected the color: " + this.color)
                    this.element.css({'backgroundColor': this.color, 'color': this.color});
                }
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.