ARTICLE AD BOX
From the w3school.com tutorials I've been looking through, I have the following code to show a 'chosen colour' on a web page, and for the user to select that colour and show a colour picker and choose from any kind of colour.
How do I then show, after they've chosen a colour and the colour picker has gone away, what the RGB or even better the CYMK values of their chosen colour is?
Here's the HTML code:
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div class="container mt-3"> <h2>Color Picker</h2> <p>To style an input with type="color" properly, use the .form-control-color class:</p> <form> <label for="myColor" class="form-label">Color picker</label> <input type="color" class="form-control form-control-color" id="myColor" value="#CCCCCC" title="Choose a color"> </form> </div> </body> </html>