Live Color Picker
A color input that live-updates a swatch and shows the HEX value.
Requires Bootstrap 5. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><div class="card border-0 shadow-sm" style="max-width:300px"><div class="card-body d-flex align-items-center gap-3"><input type="color" class="form-control form-control-color" id="cpInput" value="#0d6efd"><div><div class="fw-bold" id="cpHex">#0d6efd</div><div class="rounded mt-1" id="cpSw" style="width:60px;height:24px;background:#0d6efd"></div></div></div></div>var i=document.getElementById("cpInput");i.addEventListener("input",function(){document.getElementById("cpHex").textContent=i.value;document.getElementById("cpSw").style.background=i.value});Free to use.This component uses Bootstrap 5 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.