Display P3 Color Converter
Convert between sRGB and Display P3 with accurate color science. See out-of-gamut warnings, the closest sRGB match, and copy-paste browser CSS with @supports fallback.
Input Color sRGB
Converted Output
Chromaticity Map (CIE 1931)
Apple Display P3 Presets
Browser CSS
What Is Display P3?
Display P3 is a wide color gamut used by Apple on all modern iPhones, iPads, MacBooks, and the Studio Display. It covers about 25% more visible colors than sRGB — specifically, more saturated reds, greens, and cyans. The colors in Display P3 that sRGB cannot display are called out-of-gamut colors.
Technically, Display P3 uses the DCI-P3 primaries (a color space developed for digital cinema) but with a D65 white point and sRGB transfer function — which makes it a natural extension of sRGB for screens. This is why browsers can render both sRGB and P3 on the same page.
The tool here converts between sRGB and Display P3 using the official CSS Color Module Level 4 conversion matrices — the same math browsers use internally. It also tells you whether a P3 color can be displayed on an sRGB screen without any loss.
What Is a Color Gamut (and Why Does It Matter)?
A color gamut is the range of colors a device (or color space) can reproduce. On the CIE 1931 chromaticity diagram, a gamut is drawn as a triangle — the three corners are the purest red, green, and blue primaries of that space.
| Color Space | Gamut Coverage | Primaries | Used By |
|---|---|---|---|
| sRGB | ~35% of visible spectrum | Rec.709 | Standard web, Windows, older displays |
| Display P3 | ~45% of visible spectrum | DCI-P3 + D65 | Apple devices, modern MacBook Pro |
| Rec.2020 | ~75% of visible spectrum | UHDTV | HDR video, 4K/8K TVs |
| ProPhoto RGB | ~90% of visible spectrum | ROMM RGB | Photography (print workflows) |
When you pick a saturated green in P3 (like Apple's systemGreen), it exists outside the sRGB triangle. On an sRGB screen, the browser has to map it to the closest in-gamut color — usually by desaturating it slightly. The result is a green that looks similar but noticeably less vivid.
This is why out-of-gamut warnings matter. If you design a hero section in P3 and it looks stunning on your Mac, but 90% of your visitors are on sRGB screens, they'll see a slightly different (less vivid) color. This tool shows you exactly how much loss to expect.
How sRGB ↔ P3 Conversion Works
Converting between sRGB and Display P3 involves four steps, done in linear light (not gamma-encoded values):
- Decode gamma. sRGB uses a transfer function (gamma ≈ 2.2 with a linear segment near black). Decode it to get linear RGB values.
- Matrix transform. Convert from sRGB primaries to P3 primaries using a 3×3 matrix. Both spaces use D65 white point, so no chromatic adaptation is needed.
- Gamut check. If any linear RGB value is below 0 or above 1, the color is out of gamut.
- Encode gamma. Apply the sRGB or P3 transfer function back to get displayable RGB values.
The matrix used by browsers (and this tool) is the one defined in CSS Color Level 4. It's accurate to sub-ΔE 1, which is well below the threshold of human perception (~ΔE 2).
The interesting insight: since sRGB is fully inside P3, sRGB → P3 conversion is always in-gamut (every sRGB color is representable in P3). But P3 → sRGB is often out-of-gamut — that's where the warnings kick in.
How to Use color(display-p3) in CSS
The CSS Color Module Level 4 introduces the color() function for specifying colors in any color space. For Display P3, the syntax is:
The three numbers are the P3 linear RGB channels, scaled to 0–1 (or 0–255 if you use color(display-p3 59 130 246)). Notice there's no comma — the space-separated syntax is required for color().
Browser Support (2024)
Display P3 in CSS is supported by:
- Chrome 111+ (all platforms)
- Safari 10+ (Apple devices with wide-gamut screens)
- Firefox 113+ (on macOS with P3 display, Windows 11 with HDR display)
- Edge 111+
On screens that only support sRGB (most Windows laptops, Android mid-range devices), the browser automatically maps the P3 color to the closest sRGB equivalent. So you can safely use P3 colors on any site — they'll just look slightly less vivid on sRGB screens.
Progressive Enhancement Pattern
For the safest cross-browser implementation, use the @supports progressive enhancement pattern:
This way, browsers that support P3 get the vivid version, and older browsers show the sRGB fallback. This is the pattern this tool generates when you click "Copy CSS" on the @supports tab.
What Happens When a P3 Color Is Out of sRGB Gamut?
When you convert a P3 color to sRGB and the result contains negative or >1 channel values, the color is out-of-gamut — it cannot be displayed on an sRGB screen without loss. Browsers handle this with one of three strategies:
1. Clamp
Simply clip negative values to 0 and >1 values to 1. This is what most browsers do by default. Fast, but can shift hue noticeably.
2. Clip + Preserve Hue
Clip while preserving the hue angle in HSL/OKLCH space. Reduces saturation without shifting the hue. What this tool uses for its "closest sRGB match."
3. Perceptual Rendering
Use a perceptual color appearance model (CAM16, OKLCH) to find the closest visually similar color. Slower, but preserves intent better. Used by some design tools.
For most web use cases, strategy 2 (clip + preserve hue) gives the best result. This tool uses it for the "closest sRGB match" output — you'll see a color that has the same hue and lightness as the original P3 color but with reduced saturation.
When You Actually Need Display P3
🍎 Apple-Targeted Design
If your audience is primarily on iPhone, iPad, or MacBook, P3 colors will look more vivid and premium than sRGB. Use P3 for brand accents.
🎨 Brand Colors That Are Extremely Saturated
Many modern brands (Figma, Linear, Stripe) use colors outside sRGB. P3 lets you display the actual brand color instead of a muted approximation.
📸 Photo-Heavy Sites
Photography rendered in P3 preserves the original colors of modern cameras (which capture in wider gamuts than sRGB).
🎬 Video Players
HDR video is encoded in P3 or Rec.2020. Showing accurate colors requires P3 support in the surrounding UI.
🖼️ Design Tools
Figma, Sketch, and Photoshop all support P3. If your design tool exports P3 colors, use this tool to see how they'll look in the browser.
🎮 Games & Creative Apps
Games and creative apps benefit most from P3's extra saturation — especially for neon, fantasy, and high-energy palettes.
Display P3 Design Best Practices
- Always provide an sRGB fallback. Even in 2024, ~30% of web traffic is on screens that only support sRGB. Never rely on P3-only colors for critical UI.
- Use P3 as enhancement, not foundation. Design your core palette in sRGB. Then upgrade accent colors to P3 for the "wow" factor.
- Check out-of-gamut on every color. A P3 color that's ΔE > 5 out of gamut will look noticeably different on sRGB screens. If it matters, pick a closer in-gamut alternative.
- Don't assume P3 in screenshots. If your product takes screenshots, verify that P3 colors survive the screenshot (some screenshot APIs render in sRGB only).
- Test on real devices. Emulators and dev tools often simulate P3 incorrectly. Test on a real iPhone or MacBook to see the true colors.
- Use @supports for progressive enhancement. This is the standard pattern — it gives P3 browsers the vivid version while keeping sRGB fallbacks for everyone else.
- Beware of image assets. PNG/JPG files rendered in sRGB will look duller than nearby P3 CSS colors. Use P3-encoded images (or WebP with ICC profile) if you need the color to match.
Display P3 Color Converter FAQ
What is Display P3?
Display P3 is a wide color gamut used by Apple on all modern iPhones, iPads, MacBooks, and Studio Displays. It covers ~25% more visible colors than sRGB, primarily more saturated reds, greens, and cyans.
What's the difference between Display P3 and sRGB?
sRGB is the standard web color gamut covering ~35% of the visible spectrum. Display P3 covers ~45%. The extra range in P3 allows more saturated primaries — think neon pinks and vivid greens that aren't reproducible in sRGB.
How does sRGB to P3 conversion work?
The conversion decodes sRGB gamma, applies a 3×3 matrix transform to P3 primaries, and re-encodes with the P3 transfer function. Both spaces share the D65 white point, so no chromatic adaptation is needed.
What is out-of-gamut?
A color is "out of gamut" for sRGB when it falls outside the sRGB triangle on the CIE chromaticity diagram. These are colors that an sRGB display physically cannot reproduce — usually very saturated reds, greens, and cyans.
What happens when a P3 color is out of sRGB gamut?
Browsers map it to the closest in-gamut color, usually by clamping negative/>1 channel values or by desaturating while preserving hue. The result looks similar but less vivid. This tool shows the exact closest sRGB match.
Is Display P3 supported in all browsers?
Yes, in all modern browsers (Chrome 111+, Safari 10+, Firefox 113+, Edge 111+). On screens that only support sRGB, browsers automatically map the P3 color to the closest sRGB equivalent.
How do I use color(display-p3) in CSS?
Use color(display-p3 R G B) where R, G, B are 0–1 channel values. For example, color(display-p3 0.23 0.51 0.96). Always provide an sRGB fallback with @supports.
Do I need a P3 display to see the difference?
Yes for the extra saturation. On an sRGB display, P3 colors are mapped to their closest sRGB equivalents, so you won't see the wider gamut. However, the CSS itself works on all displays.
Should I design in P3 or sRGB?
Design your core palette in sRGB for reliability. Use P3 as an enhancement for accent colors that will look more vivid on Apple devices. Always provide sRGB fallbacks for critical UI.
What is the closest sRGB match?
When a P3 color is out-of-gamut in sRGB, the "closest sRGB match" is the perceptually nearest color that fits in sRGB. This tool computes it using the OKLCH color space for accurate perceptual matching.
What's ΔE and why does it matter?
ΔE (delta E) is a measure of visual color difference. ΔE < 1 is imperceptible, ΔE 2–3 is barely noticeable, ΔE > 5 is clearly visible. This tool shows ΔE for the closest sRGB match to indicate how much the color shifts.
Does Display P3 use the same gamma as sRGB?
Yes. Display P3 uses the same transfer function (gamma curve) as sRGB — a piecewise function with gamma ≈ 2.2 and a linear segment near black. Only the primaries differ (P3 uses DCI-P3 primaries with D65 white point).
Can I convert to other wide gamuts like Rec.2020?
This tool is focused on sRGB ↔ Display P3, the most common pairing in web design. For Rec.2020, use a dedicated color management tool or the CSS color(rec2020 ...) function directly (though browser support is limited).
What are the Apple P3 system colors?
Apple defines systemBlue, systemRed, systemGreen, and other system colors in the Display P3 color space. These are the colors iOS and macOS use for buttons, links, and status indicators. Presets in this tool include the exact P3 values.
Is this tool free?
Yes. Completely free, no signup, no email, no data collection. Everything runs locally in your browser.