JavaScript for WordPress Forums Gutenberg Development Getting the colour value from ColorPalette

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44882
    alantucker
    Participant

    Hi

    I have a working ColorPalette control working in the inspector but I am unsure how to get the value and apply it to the background of my block when making changes etc?

    Thanks

    #44892
    alantucker
    Participant

    Don’t worry I have figured it out 🙂

    #44897
    Zac Gordon
    Keymaster

    Nice! Most likely using the style attribute on an element 👍

    #44899
    alantucker
    Participant

    Using style={ { backgroundColor: colorPaletteControl } } seemed to work 😉

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.