Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

WebKit 4 min read Announcement mediumAdept

Add wide gamut P3 and alpha transparency to your color picker in HTML

`<input type="color">` now supports two new optional attributes, `alpha` and `colorspace`, added to the HTML standard with WHATWG and first shipped in Safari 18.4. With `colorspace="display-p3"` users can pick from the full P3 wide gamut, `limited-srgb` keeps the old 8-bit sRGB behavior, and `alpha` adds an opacity control. The `value` attribute now accepts any CSS color syntax, such as named colors, `oklab()` or `color(display-p3 ...)`, not just hex. Older browsers fall back to an sRGB picker without opacity, and to black for unsupported value syntax, so the attributes can be used today as progressive enhancement.

Assumes: HTML form inputsCSS color syntax

Related posts

  • Wide Gamut 2D Graphics using HTML Canvas

    WebKit mediumAdept

    WebKit now supports Display P3 color spaces for 2D canvas via getContext("2d", { colorSpace: "display-p3" }), so fills, strokes, gradients, shadows and text can use wide gamut CSS colors. Out-of-gamut colors are clamped to the canvas color space. getImageData, putImageData, the ImageData constructor and drawImage convert between color spaces, and toDataURL/toBlob embed color profiles. Code is included for detecting display, canvas and CSS Color 4 support. Remaining gaps include 8-bit-only ImageData, no HDR color spaces, and WebGL/WebGPU support.

  • Customizing Color Fonts on the Web

    WebKit mediumAdept

    WebKit (Safari 15.4+) supports the CSS `@font-palette-values` at-rule, which lets authors select a color font's predefined CPAL palettes by index and override individual palette colors, then apply them with the `font-palette` property. Browsers without support fall back to palette 0, which can be guarded with `@supports`. `font-palette: light`/`dark` pick palettes the font marks for light or dark backgrounds and pair naturally with `prefers-color-scheme`. Because palette rules are scoped per font family, one palette name can map to different palettes across fallback fonts. Foreground-color shapes in some fonts follow the `color` property instead, and authors should keep palette contrast high for legibility.

  • WebKit Features in Safari 17.0

    WebKit mediumAdept

    Safari 17.0 ships for iOS 17, iPadOS 17 and macOS with a broad set of web platform features, starting with the new HTML <search> element (Safari is the first browser to ship it), the popover attribute and API, and <hr> inside <select>. On the CSS side it adds expanded font-size-adjust (from-font and two-value syntax), font-format()/font-tech() feature queries, unprefixed hyphens, @counter-style, full-width text-transform, the remaining Media Queries level 4 features, and image-set() type/resolution arguments. It also fixes accessibility problems with display:contents and supports the full Storage API, with an origin quota now calculated from total disk space instead of a fixed 1 GB. Code examples show usage, such as adding role="search" to <search> until other browsers support it.

  • WebKit Features for Safari 27.2

    WebKit mediumAdept

    Safari 27.2 refines Customizable Select with a new `::field-content` pseudo-element for styling the displayed selected option without `<selectedcontent>`, adjusts `appearance: base-select` UA styles (flex-based button spacing, inherited `text-overflow`, simpler `::picker-icon`), and uses `safe` alignment so large pickers stay within the viewport. Grid Lanes renames `flow-tolerance` to `fit-tolerance` (old name kept as a deprecated alias); the property sets how close column heights must be to count as tied, and raising it well above the 1em default keeps item order steadier for keyboard users. The release also ships 20 bug fixes spanning accessibility, media/WebCodecs, cookies under CNAME, WebGPU indirect draws, and WebRTC.

  • An HTML Switch Control

    WebKit mediumAdept

    Safari 17.4 adds a native HTML switch control via `<input type=checkbox switch>`, which falls back to a plain checkbox in browsers without support. It mirrors the checkbox API (`:indeterminate` never matches), uses the ARIA switch role with On/Off announcements and OS accessibility indicators, and supports vertical writing modes. It also honors `accent-color` on the track, and `appearance: none` resets all properties to initial values for full custom styling. Use a switch for on/off settings and a checkbox for selection. Experimental `::thumb` and `::track` pseudo-elements sit behind a feature flag pending standardization.

The quest for software engineering knowledge.

Look:
Layout: