MDN self-hosted library · e01.org

HTMLInputElement: colorSpace property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<input id="color-picker" type="color" colorspace="display-p3" alpha />
js
const colorInput = document.getElementById("color-picker");
console.log(colorInput.colorSpace); // "display-p3"
colorInput.colorSpace = "limited-srgb"; // convert to srgb