← Chrome 155 reference

v155 · miscellaneous · enabled by default

PredefinedColorSpace srgb-linear and display-p3-linear

Limited availability — the linear color spaces are new in Chrome 155

  • Chrome · 155 (desktop, Android, WebView)
  • Edge · Chromium-based; no own record yet
  • Firefox · no signal (no canvas colorSpace at all)
  • Safari · implemented in WebKit; release not recorded

ChromeStatus maps this change to the canvas-2d-color-management web feature, which is itself only Limited availability (queried 2026-10-11): canvas color management shipped in Chrome 92 and Safari 15.2, but Firefox has never shipped the colorSpace setting. The two linear values documented here are newer still — Chrome ships them in 155, WebKit “suggested [the feature and has] already implemented” it per the Intent to Ship, with no shipping Safari version recorded in the sources read, and Mozilla’s position is no signal. Feature-detect before relying on them; see examples.

From Chrome 155, the PredefinedColorSpace enum used by canvas APIs accepts two additional values defined by CSS Color 4: "srgb-linear" and "display-p3-linear". They give a 2D canvas (and ImageData) a linear-light working color space — pixel values proportional to luminance, with no transfer-function gamma — which is what physically-based rendering, anti-aliasing, decimation, and interpolation pipelines expect. Previously only "srgb" and "display-p3" (both gamma-encoded) were available.

at a glance

Shipped inChrome 155 (desktop, Android, Android WebView; no iOS milestone recorded) — filed under “Enabled by default” in the milestone=155 listing (fetched 2026-10-11); per-platform milestones from the ChromeStatus API record and the Intent’s “Estimated milestones”
Runtime flagColorSpacePredefinedLinearSpaces, status stable in Blink’s runtime_enabled_features.json5 (its comment cites this ChromeStatus entry; verified 2026-10-11). Finch feature name: ColorSpacePredefinedLinearSpaces, “will ship enabled for all users” per the Intent
SpecificationHTML Standard §4.12.5.4 — color spaces and color space conversion; the color spaces themselves are defined in CSS Color 4 — srgb-linear and display-p3-linear
Tracking bugissuetracker.google.com/454152417
Intent to Shipblink-dev thread, also archived as mail-archive msg17379
TAG revieww3ctag/design-reviews#1194 (“for the full HDR on the web project, which this is a part of”; issues addressed)
Web platform testsgetContextAttributes.html (set/get) · 2d.color.space draw-and-readback tests (both named by the Intent)
ChromeStatus5122501071994880 — PredefinedColorSpace srgb-linear and display-p3-linear (blink component Blink>Canvas)

what changed

The PredefinedColorSpace enumeration “is used to specify the color space of the canvas's backing store” (HTML Standard §4.12.5.4). The HTML Standard now defines four values; Chrome 155 adds support for the two linear ones:

Enum valueColor space (CSS Color 4)Chrome support
"srgb"sRGB (gamma-encoded; the default)Since canvas color management shipped in 92 (BCD)
"display-p3"Display P3 (gamma-encoded, wide gamut)Since 92 (same BCD entry)
"srgb-linear"Linear-light sRGB — sRGB primaries, identity transfer functionNew in 155
"display-p3-linear"Linear-light Display P3 — P3 primaries, identity transfer functionNew in 155

In a linear working space, arithmetic on pixel values is arithmetic on light: blending two pixels averages their luminance instead of their gamma-encoded codes. That is why the Intent’s motivation calls linear spaces “extremely commonly used in applications with connections to physical light rendering (e.g., games) or spatial processing (e.g., decimation, anti-aliasing, and interpolation)”. Color space conversion is applied when the canvas is rendered to the output device: “Color space conversion must be applied to the canvas's backing store when rendering the canvas to the output device” (HTML Standard, same section), so a linear backing store still displays correctly. Note that an 8-bit-per-channel backing store (colorType: "unorm8", the default) quantizes linear values coarsely in the dark range; the companion CanvasColorType enum ("unorm8", "float16") exists for that reason — the two settings are independent members of the same settings dictionary.

Source: HTML Standard §4.12.5.4 (quoted verbatim, fetched 2026-10-11); CSS Color 4 — predefined color spaces; motivation quoted from the Intent to Ship

syntax

No new members are added — the change widens the value set of an existing enum. IDL verbatim from the HTML Standard (fetched 2026-10-11):

enum PredefinedColorSpace { "srgb", "srgb-linear", "display-p3", "display-p3-linear" };

The enum is consumed by the 2D context settings dictionary — passed as the second argument of canvas.getContext("2d", settings) (and OffscreenCanvas.getContext("2d", settings)) and read back with getContextAttributes():

dictionary CanvasRenderingContext2DSettings {
  boolean alpha = true;
  boolean desynchronized = false;
  PredefinedColorSpace colorSpace = "srgb";
  CanvasColorType colorType = "unorm8";
  boolean willReadFrequently = false;
};

enum CanvasColorType { "unorm8", "float16" };

and by ImageData, via the settings dictionary accepted by the ImageData constructor and by createImageData() / getImageData(), and reflected by the read-only ImageData.colorSpace attribute (IDL verbatim from HTML Standard §ImageData):

dictionary ImageDataSettings {
  PredefinedColorSpace colorSpace;
  ImageDataPixelFormat pixelFormat = "rgba-unorm8";
};

Because PredefinedColorSpace is a Web IDL enumeration, passing a string outside the supported set to a dictionary member of this type throws a TypeError at the call site (Web IDL — enumeration types) — in a browser that hasn’t shipped this feature, "srgb-linear" is exactly such a string. That makes support detectable with a try/catch (see examples). The same enum type is also referenced by the WebGL (drawingBufferColorSpace, unpackColorSpace) and WebGPU (GPUCanvasConfiguration.colorSpace) specifications; whether Chrome 155 accepts the linear values on those surfaces is not stated in the sources read here, which document the canvas-2D and ImageData entry points named by the ChromeStatus record.

Source: HTML Standard §4.12.5.4 and §ImageData (IDL verbatim); Web IDL §enumerations

examples

Requesting a linear-light 2D canvas, with honest fallback (snippet gendn-derived from the IDL above):

const canvas = document.querySelector('canvas');

let ctx;
try {
  // Throws TypeError where "srgb-linear" isn't a known enum value.
  ctx = canvas.getContext('2d', {
    colorSpace: 'srgb-linear',
    colorType: 'float16', // avoid 8-bit banding in linear light
  });
} catch {
  ctx = canvas.getContext('2d'); // gamma-encoded srgb fallback
}

// Confirm what the context actually holds:
console.log(ctx.getContextAttributes().colorSpace);
// "srgb-linear" in Chrome 155+, "srgb" on the fallback path

Why linear matters — a 50% blend of pure red and pure green. In gamma-encoded sRGB the midpoint is a muddy dark yellow; in linear light it keeps physical brightness (then converts for display):

// In "srgb-linear", gradient midpoints and globalAlpha compositing
// average LIGHT, not gamma codes:
const g = ctx.createLinearGradient(0, 0, 256, 0);
g.addColorStop(0, 'color(srgb-linear 1 0 0)');
g.addColorStop(1, 'color(srgb-linear 0 1 0)');
ctx.fillStyle = g;
ctx.fillRect(0, 0, 256, 64);

// Reading pixels back in the same space:
const data = ctx.getImageData(0, 0, 256, 64, { colorSpace: 'srgb-linear' });
console.log(data.colorSpace); // "srgb-linear"
Live example from the Chrome Platform Showcase (route HEAD-checked 200, 2026-10-11): the same gradients rendered in srgb and srgb-linear backing stores. Sibling concept demos (all 200): context settings & readback, ImageData round trip, additive spotlights, detection traps.Source: chrome-platform-showcase
Source: API shapes per the HTML Standard; color(srgb-linear …) syntax per CSS Color 4; snippets gendn-derived (labelled), exercised live by the embedded showcase demo

browser compatibility

BCD has no subfeature for the linear values yet: the BCD options_colorSpace_parameter and ImageData.colorSpace entries (package data 8.1.5, 2026-10-08) record only the colorSpace option itself. The table below is therefore interim, built from the ChromeStatus record and the Intent:

Browser"srgb-linear" / "display-p3-linear"Notes
Chrome155 (interim: ChromeStatus, not yet BCD)Desktop, Android, Android WebView per the ChromeStatus API record; no iOS milestone recorded. Flag ColorSpacePredefinedLinearSpaces is stable
EdgeUnknownChromium-based, expected to inherit at its 155-based release; no source read here records an Edge version
FirefoxNoMozilla position: standards-positions#1453, “No signal” per the ChromeStatus record — and Firefox has never shipped the prerequisite colorSpace setting (BCD: version_added: false)
SafariImplemented; release unknown“Suggested by WebKit, already implemented in WebKit” per the Intent to Ship; no shipping Safari version is recorded in the sources read
Prerequisite — the colorSpace context/ImageData option itself, per BCD (verified 2026-10-11): Chrome 92, Safari 15.2, Firefox not supported, Edge mirrors Chrome.

Treat the linear spaces as a progressive enhancement: request them in a try/catch, verify with getContextAttributes(), and keep the gamma-encoded path working. The Baseline web feature this belongs to (canvas-2d-color-management) is Limited availability.

Source: ChromeStatus API record; Intent to Ship; BCD api/HTMLCanvasElement.json and api/ImageData.json (no linear-value subfeature); webstatus.dev canvas-2d-color-management

security and privacy

The Intent to Ship lists Security: “None” and Activation: “None”. The change adds no new data source: it widens an existing enum on surfaces the page already controls, and the backing-store contents remain subject to the canvas’s existing origin-clean rules. As with any new enum value, which values a browser accepts is observable (the TypeError detection path above), adding at most one more bit to the already-detectable canvas color-management surface; the sources read record no other privacy considerations.

Source: Intent to Ship (Risks — Security/Privacy sections); origin-clean rules per the HTML Standard

specifications

Source: HTML Living Standard §4.12.5.4 and CSS Color Module Level 4 predefined color spaces, both fetched 2026-10-11; the HTML Standard enum already includes the two linear values

see also