Color management for 2D canvas
The optional colorSpace parameter of a 2D canvas's getContext() method chooses the color representation, such as "srgb" or "display-p3".
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
getContext (2d context options colorSpace parameter) | 92 | 92 | | 15.2 | 92 | 15.2 |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Use cases
-
Using Color management for 2D canvas
The optional colorSpace parameter of a 2D canvas's getContext() method chooses the color representation, such as "srgb" or "display-p3".
Cautions
- Limited browser support. Check compatibility before use.
Implementation notes
- Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.