<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>311727</bug_id>
          
          <creation_ts>2026-04-08 06:17:08 -0700</creation_ts>
          <short_desc>Implement `color_scheme_dark` manifest member</short_desc>
          <delta_ts>2026-04-10 07:13:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">marcosc</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>dmurph</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2197961</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-04-08 06:17:08 -0700</bug_when>
    <thetext>The Web App Manifest spec (w3c/manifest PR #1207) adds a `color_scheme_dark` member that allows web apps to specify alternative `theme_color` and `background_color` values for dark-mode operating system themes.

**Spec PR:** https://github.com/w3c/manifest/pull/1207
**Closes manifest issue:** https://github.com/w3c/manifest/issues/975

## What to implement

`color_scheme_dark` is an ordered map whose keys are &quot;themeable members&quot; (`theme_color`, `background_color`) and whose values are CSS color strings.

When applying a manifest and the OS uses a dark color theme, for each themeable member that exists in `color_scheme_dark`, the UA SHOULD use the dark value in place of the base value, unless user accessibility preferences take precedence.

**Example manifest:**
```json
{
  &quot;background_color&quot;: &quot;#fff&quot;,
  &quot;theme_color&quot;: &quot;red&quot;,
  &quot;color_scheme_dark&quot;: {
    &quot;background_color&quot;: &quot;#000&quot;,
    &quot;theme_color&quot;: &quot;hotpink&quot;
  }
}
```

## Implementation notes

- Parse `color_scheme_dark` as an ordered map during manifest processing (see `process the color_scheme_dark member` algorithm in the spec)
- Iterate over the fixed list « &quot;theme_color&quot;, &quot;background_color&quot; » (not arbitrary keys)
- Use the dark values when the system is in dark appearance (UIUserInterfaceStyleDark / NSAppearance.currentAppearance)
- Existing `theme_color` and `background_color` behavior is unchanged when `color_scheme_dark` is absent or the system is in light mode

## Status

Spec PR is open; waiting for at least one implementation commitment before merging. This bug is the WebKit commitment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197962</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-04-08 06:17:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/174315709&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2198410</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Murphy">dmurph</who>
    <bug_when>2026-04-09 10:09:31 -0700</bug_when>
    <thetext>Hello!

Chromium intends on supporting this as well, this is our implementation tracking bug: https://crbug.com/383165202

Dan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2198785</commentid>
    <comment_count>3</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2026-04-10 07:13:32 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62443</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>