Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:33:25+00:00 2026-06-15T09:33:25+00:00

How do I create a color picker that the user can choose a desired

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:33:27+00:00Added an answer on June 15, 2026 at 9:33 am

    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:

    <?php echo("<p style='background-color:".$_GET['colorHex']."'>paragraph here</p>");?>
    

    Provided that the URL is something like: Test.com/page.php?colorHex=#094037

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a codecademy.com lesson that uses jQuery to create a color picker,
I can't create an animation, or customize a color in ContentPresenter (NormalTextDay), this error
I used the information on this post to create a Color Picker on my
Can we change the color of the divider? Apple documentations says, that we can
I am building a color picker that uses CSS gradients instead on images. I
What I need is a simple color picker (max 6-8 color) so the user
I currently have a simple color picker that loads in a color gradient image
In ~/Library/Colors you can find saved palette files created in OSX's color picker. What
I'm trying to create a widget that I can use with Knockout.js I've taken
How would one create a deterministic Javascript HTML colour picker which given arguments of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.