Professional Color Picker - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Professional Color Picker</title> <style> body { font-family: 'Arial', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f2f5; margin: 0; } .color-picker-container { display: flex; flex-direction: column; align-items: center; background: #ffffff; border-radius: 15px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); padding: 20px; width: 300px; } .color-picker-container h2 { margin-bottom: 20px; color: #333; } .color-picker { display: flex; align-items: center; } .color-input { width: 50px; height: 50px; border: none; cursor: pointer; margin-right: 10px; border-radius: 50%; box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); transition: transform 0.3s; } .color-input:hover { transform: scale(1.1); } .color-code { font-size: 1.2em; color: #555; } .copy-btn { display: flex; align-items: center; margin-top: 20px; padding: 10px 20px; background: #007bff; color: #fff; border: none; border-radius: 5px; cursor: pointer; transition: background 0.3s; } .copy-btn:hover { background: #0056b3; } .copy-btn i { margin-right: 10px; } .notification { position: fixed; bottom: 20px; right: 20px; background: #28a745; color: #fff; padding: 10px 20px; border-radius: 5px; display: none; align-items: center; } .notification i { margin-right: 10px; } </style> </head> <body> <div class="color-picker-container"> <h2>Pick a Color 🎨</h2> <div class="color-picker"> <input type="color" class="color-input" id="colorInput" title="color"> <span class="color-code" id="colorCode">#ffffff</span> </div> <button class="copy-btn" onclick="copyColorCode()"> <i class="fas fa-copy"></i> Copy Color Code </button> </div> <div class="notification" id="notification"> <i class="fas fa-check"></i> Color code copied! </div> <script src="https://kit.fontawesome.com/a076d05399.js"></script> <script> const colorInput = document.getElementById('colorInput'); const colorCode = document.getElementById('colorCode'); const notification = document.getElementById('notification'); colorInput.addEventListener('input', () => { colorCode.textContent = colorInput.value; }); function copyColorCode() { const code = colorCode.textContent; navigator.clipboard.writeText(code).then(() => { showNotification(); }); } function showNotification() { notification.style.display = 'flex'; setTimeout(() => { notification.style.display = 'none'; }, 2000); } </script> </body> </html>