Minimalistic 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>Minimalistic Color Picker</title> <style> body { font-family: 'Arial', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background: #f8f9fa; margin: 0; } .color-picker-container { display: flex; flex-direction: column; align-items: center; background: #ffffff; border-radius: 10px; box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); padding: 25px; width: 280px; } .color-picker-container h2 { margin-bottom: 15px; color: #444; } .color-picker { display: flex; align-items: center; } .color-input { width: 40px; height: 40px; border: none; cursor: pointer; margin-right: 15px; border-radius: 50%; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); transition: transform 0.3s; } .color-input:hover { transform: scale(1.2); } .color-code { font-size: 1.1em; color: #666; } .copy-btn { display: flex; align-items: center; margin-top: 15px; padding: 8px 18px; background: #28a745; color: #fff; border: none; border-radius: 5px; cursor: pointer; transition: background 0.3s; } .copy-btn:hover { background: #218838; } .copy-btn i { margin-right: 8px; } .notification { position: fixed; bottom: 20px; right: 20px; background: #007bff; color: #fff; padding: 10px 20px; border-radius: 5px; display: none; align-items: center; } .notification i { margin-right: 8px; } </style> </head> <body> <div class="color-picker-container"> <h2>Choose 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>