---
title: "Add wide gamut P3 and alpha transparency to your color picker in HTML"
description: "`<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."
url: "https://swe.quest/articles/add-wide-gamut-p3-and-alpha-transparency-to-your-color-picker-in-html-2bf169620936554b"
canonical: "https://webkit.org/blog/16900/p3-and-alpha-color-pickers/"
source: "WebKit"
published: "2025-05-07"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["browsers","frontend","css"]
---

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

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2025-05-07, 4 min read, Announcement. Original: [https://webkit.org/blog/16900/p3-and-alpha-color-pickers/](https://webkit.org/blog/16900/p3-and-alpha-color-pickers/)

## Summary

\`\<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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [CSS](https://swe.quest/tags/css.md) (Web & mobile)

## Prerequisites

- HTML form inputs
- CSS color syntax ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))

## Keywords

Safari 18.4, WebKit, Display P3, input type=color, WHATWG, oklab

## Related posts

- [Wide Gamut 2D Graphics using HTML Canvas](https://swe.quest/articles/wide-gamut-2d-graphics-using-html-canvas-c32c74a661ded0f9.md): WebKit · 2021-12-14 · Medium · 9 min read · Browsers, Frontend, JavaScript
  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.
- [Customizing Color Fonts on the Web](https://swe.quest/articles/customizing-color-fonts-on-the-web-74940ba780f012e8.md): WebKit · 2022-05-25 · Medium · 7 min read · CSS, Browsers, Frontend
  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.
- [WebKit Features in Safari 17.0](https://swe.quest/articles/webkit-features-in-safari-17-0-52bf316b5755d24e.md): WebKit · 2023-09-18 · Medium · 45 min read · Browsers, CSS, Accessibility, Frontend
  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\>.
- [WebKit Features for Safari 27.2](https://swe.quest/articles/webkit-features-for-safari-27-2-f545f4ccec69d87b.md): WebKit · 2026-10-26 · Medium · 5 min read · Browsers, CSS, Frontend, Accessibility
  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.
- [An HTML Switch Control](https://swe.quest/articles/an-html-switch-control-f6ff0673a2bcdfca.md): WebKit · 2024-02-28 · Medium · 3 min read · Browsers, Frontend, Accessibility, CSS
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
