<input id="color-picker" type="color" alpha />HTMLInputElement: alpha property / notebook
HTMLInputElement: alpha property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const colorInput = document.getElementById("color-picker");
if (colorInput.alpha) {
// Color values contain an alpha component
} else {
// We have fully opaque color values
}