Color Picker
Easy
55
63.4% Acceptance
In this lab, you'll build a simple color picker application using HTML and JavaScript. The user should be able to select a color using the input element and see the selected color displayed on the screen in the form of div element. In addition to that, a paragraph element inside the div should display the color code of the chosen color.
Instructions
- Create an
input
element of typecolor
with idcolorPicker
. - Create a
div
element with idcolorDisplay
to show the selected color - Create a
p
element inside thediv#colorDisplay
with idcolorCode
to show the color code. - Add an event listener to
#colorPicker
to listen for input chage. You can useinput
event - When
input
event is triggered, capture the color from the#colorPicker
- Set the captured color as the background color of
#colorDisplay
- Show the color Hex Code in the
#colorCode
element