Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLInputElement
  4. colorSpace

HTMLInputElement: colorSpace property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

ThecolorSpace property of theHTMLInputElement interface reflects the<input> element'scolorspace attribute, which indicates whether thecolor space of the serialized CSS color issRGB (the default) ordisplay-p3. It is only relevant tocolor controls.

Value

A string containing the value of thecolorspace attribute.

Examples

Getting and setting color spaces

html
<input 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

Specifications

Specification
HTML
# dom-input-colorspace

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp