How do I create a color picker that the user can choose a desired hex value and dynamically place it as attributes in a html tag like in the example below.
<p style="background-color: #FCF8C0;">TEXT GOES HERE</p>
In the example code above, I want the #FCF8C0 to be dynamic based on the user picking a color on the fly and once done choosing a hex value, the background dynamically changes on mouse out.
Well, you CAN do it in PHP, but it would be more efficient to do in JS. For PHP, one way would be to refresh the page with a new $_GET value. Then you can use:
Provided that the URL is something like:
Test.com/page.php?colorHex=#094037