Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorManagement in browserSettings #7893

@@ -0,0 +1,65 @@
---
title: browserSettings.colorManagement
slug: Mozilla/Add-ons/WebExtensions/API/browserSettings/colorManagement
tags:
- API
- Add-ons
- Extensions
- Property
- Reference
- WebExtensions
- browserSettings
- colorManagement
browser-compat: webextensions.api.browserSettings.colorManagement
---
<div>{{AddonSidebar()}}</div>

<p>A {{WebExtAPIRef("types.BrowserSetting", "BrowserSetting")}} object used to query and set the browser's color management features. The object has these properties:</p>

<dl>
<dt><code>mode</code></dt>
<dd>
<p>
A string that represents the mode used for color management. Valid values are <code>off</code>, <code>full</code>, and <code>tagged_only</code>.
</p>
</dd>
<dt><code>useNativeSRGB</code></dt>
<dd>
<p>
A boolean representing whether or not native sRGB color management is used.
</p>
</dd>
<dt><code>useWebRenderCompositor</code></dt>
<dd>
<p>
A boolean representing whether or not the WebRender compositor is used.
</p>
</dd>
</dl>


<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{Compat}}</p>

<h2 id="Examples">Examples</h2>

<p>Set color mode to "full":</p>

<pre class="brush: js">function logResult(result) {
console.log(`Setting was modified: ${result}`);
}

browser.browserSettings.colorManagement.mode.set({value: "full"}).
then(logResult);</pre>

<p>Get the native sRGB color management color mode:</p>

<pre class="brush: js">function logResult(result) {
console.log(`Current useNativeSRGB value: ${result.value}`);
}

browser.browserSettings.colorManagement.useNativeSRGB.get({}).
then(logResult);</pre>

<p>{{WebExtExamples}}</p>
@@ -1,5 +1,5 @@
---
title: contextMenuShowEvent
title: browserSettings.contextMenuShowEvent
slug: Mozilla/Add-ons/WebExtensions/API/browserSettings/contextMenuShowEvent
tags:
- API
Expand Down
Expand Up @@ -28,6 +28,8 @@ <h2 id="Properties">Properties</h2>
<dd>Determines whether the browser cache is enabled or not.</dd>
<dt>{{WebExtAPIRef("browserSettings.closeTabsByDoubleClick")}}</dt>
<dd>Determines whether the selected tab can be closed with a double click.</dd>
<dt>{{WebExtAPIRef("browserSettings.colorManagement")}}</dt>
<dd>Determines various settings for color management.</dd>
<dt>{{WebExtAPIRef("browserSettings.contextMenuShowEvent")}}</dt>
<dd>Determines the mouse event that triggers a context menu popup.</dd>
<dt>{{WebExtAPIRef("browserSettings.ftpProtocolEnabled")}}</dt>
Expand Down