Ad Code

How to create Color Picker Tools website

Advertisements
create a colour picker web page using HTML
Color Picker

Color Picker



<!DOCTYPE html> <html> <head> <title>Color Picker</title> <style> #colorInput { width: 100px; height: 100px; } </style> </head> <body> <h1>Color Picker</h1> <input type="color" id="colorInput"><br><br> <div id="colorDisplay" style="width: 100px; height: 100px;"></div> <script> const colorInput = document.querySelector("#colorInput"); const colorDisplay = document.querySelector("#colorDisplay"); colorInput.addEventListener("input", function() { colorDisplay.style.backgroundColor = colorInput.value; }); </script> </body> </html>

This code uses an HTML colour input element to allow the user to select a colour, and it displays the selected colour in a div element on the page. The JavaScript code listens for an input event on the colour input element, and when triggered, it updates the background colour of the div element to match the selected colour.
Download Link
Advertisements

Post a Comment

0 Comments