<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Color Picker App</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #333;
color: white;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
text-align: center;
padding: 40px;
background-color: #444;
border-radius: 10px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
h1 {
font-size: 2rem;
color: #ff6f61;
}
.color-box {
width: 300px;
height: 300px;
margin-top: 20px;
border-radius: 10px;
transition: background-color 0.3s ease;
}
.btn {
padding: 15px 30px;
background-color: #ff6f61;
color: white;
border: none;
border-radius: 30px;
font-size: 1.2rem;
cursor: pointer;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #ff3f2f;
}
</style>
</head>
<body>
<div class="container">
<h1>Pick Your Color!</h1>
<input type="color" id="colorPicker" class="btn">
<div class="color-box" id="colorBox"></div>
<p id="a">
</p>
</div>
<script>
document.getElementById("colorPicker").addEventListener("input", function(event) {
document.getElementById("colorBox").style.backgroundColor = event.target.value;
document.getElementById("a").innerText = event.target.value
});
</script>
</body>
</html>
Click on the little red thing for using the most bottom one
Phone user: Laptop: