A BrowserSetting
object used to query and set the browser's color management features.
By default, Firefox applies color management to tagged media and defaults to sRGB for untagged media. This behavior means that some untagged media, such as that used in animation and movie production, may have undesired color corrections made to it. Use these settings to prevent that.
The object has these properties:
mode
A string that represents the mode used for color management. Valid values are off
, full
, and tagged_only
.
useNativeSRGB
A boolean representing whether or not built-in sRGB color management is used.
useWebRenderCompositor
A boolean representing whether or not the WebRender compositor is used.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
colorManagement |
No |
No |
91 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
Set color mode to "full":
function logResult(result) { console.log(`Setting was modified: ${result}`); } browser.browserSettings.colorManagement.mode.set({value: "full"}). then(logResult);
Get the native sRGB color management color mode:
function logResult(result) { console.log(`Current useNativeSRGB value: ${result.value}`); } browser.browserSettings.colorManagement.useNativeSRGB.get({}). then(logResult);
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings/colorManagement